id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
49,400
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.getStartZonedDateTime
public ZonedDateTime getStartZonedDateTime() { if (zonedStartDateTime == null) { zonedStartDateTime = ZonedDateTime.of(startDate, startTime, zoneId); } return zonedStartDateTime; }
java
public ZonedDateTime getStartZonedDateTime() { if (zonedStartDateTime == null) { zonedStartDateTime = ZonedDateTime.of(startDate, startTime, zoneId); } return zonedStartDateTime; }
[ "public", "ZonedDateTime", "getStartZonedDateTime", "(", ")", "{", "if", "(", "zonedStartDateTime", "==", "null", ")", "{", "zonedStartDateTime", "=", "ZonedDateTime", ".", "of", "(", "startDate", ",", "startTime", ",", "zoneId", ")", ";", "}", "return", "zone...
A convenience method to retrieve a zoned date time based on the start date, start time, and time zone id. @return the zoned start time
[ "A", "convenience", "method", "to", "retrieve", "a", "zoned", "date", "time", "based", "on", "the", "start", "date", "start", "time", "and", "time", "zone", "id", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L204-L210
49,401
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.getEndZonedDateTime
public ZonedDateTime getEndZonedDateTime() { if (zonedEndDateTime == null) { zonedEndDateTime = ZonedDateTime.of(endDate, endTime, zoneId); } return zonedEndDateTime; }
java
public ZonedDateTime getEndZonedDateTime() { if (zonedEndDateTime == null) { zonedEndDateTime = ZonedDateTime.of(endDate, endTime, zoneId); } return zonedEndDateTime; }
[ "public", "ZonedDateTime", "getEndZonedDateTime", "(", ")", "{", "if", "(", "zonedEndDateTime", "==", "null", ")", "{", "zonedEndDateTime", "=", "ZonedDateTime", ".", "of", "(", "endDate", ",", "endTime", ",", "zoneId", ")", ";", "}", "return", "zonedEndDateTi...
A convenience method to retrieve a zoned date time based on the end date, end time, and time zone id. @return the zoned end time
[ "A", "convenience", "method", "to", "retrieve", "a", "zoned", "date", "time", "based", "on", "the", "end", "date", "end", "time", "and", "time", "zone", "id", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L249-L255
49,402
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withTimes
public Interval withTimes(LocalTime startTime, LocalTime endTime) { requireNonNull(startTime); requireNonNull(endTime); return new Interval(this.startDate, startTime, this.endDate, endTime, this.zoneId); }
java
public Interval withTimes(LocalTime startTime, LocalTime endTime) { requireNonNull(startTime); requireNonNull(endTime); return new Interval(this.startDate, startTime, this.endDate, endTime, this.zoneId); }
[ "public", "Interval", "withTimes", "(", "LocalTime", "startTime", ",", "LocalTime", "endTime", ")", "{", "requireNonNull", "(", "startTime", ")", ";", "requireNonNull", "(", "endTime", ")", ";", "return", "new", "Interval", "(", "this", ".", "startDate", ",", ...
Returns a new interval based on this interval but with a different start and end time. @param startTime the new start time @param endTime the new end time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "start", "and", "end", "time", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L306-L310
49,403
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withStartDate
public Interval withStartDate(LocalDate date) { requireNonNull(date); return new Interval(date, startTime, endDate, endTime, zoneId); }
java
public Interval withStartDate(LocalDate date) { requireNonNull(date); return new Interval(date, startTime, endDate, endTime, zoneId); }
[ "public", "Interval", "withStartDate", "(", "LocalDate", "date", ")", "{", "requireNonNull", "(", "date", ")", ";", "return", "new", "Interval", "(", "date", ",", "startTime", ",", "endDate", ",", "endTime", ",", "zoneId", ")", ";", "}" ]
Returns a new interval based on this interval but with a different start date. @param date the new start date @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "start", "date", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L319-L322
49,404
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withEndDate
public Interval withEndDate(LocalDate date) { requireNonNull(date); return new Interval(startDate, startTime, date, endTime, zoneId); }
java
public Interval withEndDate(LocalDate date) { requireNonNull(date); return new Interval(startDate, startTime, date, endTime, zoneId); }
[ "public", "Interval", "withEndDate", "(", "LocalDate", "date", ")", "{", "requireNonNull", "(", "date", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "startTime", ",", "date", ",", "endTime", ",", "zoneId", ")", ";", "}" ]
Returns a new interval based on this interval but with a different end date. @param date the new end date @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "end", "date", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L331-L334
49,405
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withStartTime
public Interval withStartTime(LocalTime time) { requireNonNull(time); return new Interval(startDate, time, endDate, endTime, zoneId); }
java
public Interval withStartTime(LocalTime time) { requireNonNull(time); return new Interval(startDate, time, endDate, endTime, zoneId); }
[ "public", "Interval", "withStartTime", "(", "LocalTime", "time", ")", "{", "requireNonNull", "(", "time", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "time", ",", "endDate", ",", "endTime", ",", "zoneId", ")", ";", "}" ]
Returns a new interval based on this interval but with a different start time. @param time the new start time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "start", "time", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L343-L346
49,406
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withStartDateTime
public Interval withStartDateTime(LocalDateTime dateTime) { requireNonNull(dateTime); return new Interval(dateTime.toLocalDate(), dateTime.toLocalTime(), endDate, endTime); }
java
public Interval withStartDateTime(LocalDateTime dateTime) { requireNonNull(dateTime); return new Interval(dateTime.toLocalDate(), dateTime.toLocalTime(), endDate, endTime); }
[ "public", "Interval", "withStartDateTime", "(", "LocalDateTime", "dateTime", ")", "{", "requireNonNull", "(", "dateTime", ")", ";", "return", "new", "Interval", "(", "dateTime", ".", "toLocalDate", "(", ")", ",", "dateTime", ".", "toLocalTime", "(", ")", ",", ...
Returns a new interval based on this interval but with a different start date and time. @param dateTime the new start date and time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "start", "date", "and", "time", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L355-L358
49,407
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withEndTime
public Interval withEndTime(LocalTime time) { requireNonNull(time); return new Interval(startDate, startTime, endDate, time, zoneId); }
java
public Interval withEndTime(LocalTime time) { requireNonNull(time); return new Interval(startDate, startTime, endDate, time, zoneId); }
[ "public", "Interval", "withEndTime", "(", "LocalTime", "time", ")", "{", "requireNonNull", "(", "time", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "startTime", ",", "endDate", ",", "time", ",", "zoneId", ")", ";", "}" ]
Returns a new interval based on this interval but with a different end time. @param time the new end time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "end", "time", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L367-L370
49,408
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withEndDateTime
public Interval withEndDateTime(LocalDateTime dateTime) { requireNonNull(dateTime); return new Interval(startDate, startTime, dateTime.toLocalDate(), dateTime.toLocalTime()); }
java
public Interval withEndDateTime(LocalDateTime dateTime) { requireNonNull(dateTime); return new Interval(startDate, startTime, dateTime.toLocalDate(), dateTime.toLocalTime()); }
[ "public", "Interval", "withEndDateTime", "(", "LocalDateTime", "dateTime", ")", "{", "requireNonNull", "(", "dateTime", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "startTime", ",", "dateTime", ".", "toLocalDate", "(", ")", ",", "dateTime", "...
Returns a new interval based on this interval but with a different end date and time. @param dateTime the new end date and time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "end", "date", "and", "time", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L379-L382
49,409
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withZoneId
public Interval withZoneId(ZoneId zone) { requireNonNull(zone); return new Interval(startDate, startTime, endDate, endTime, zone); }
java
public Interval withZoneId(ZoneId zone) { requireNonNull(zone); return new Interval(startDate, startTime, endDate, endTime, zone); }
[ "public", "Interval", "withZoneId", "(", "ZoneId", "zone", ")", "{", "requireNonNull", "(", "zone", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "startTime", ",", "endDate", ",", "endTime", ",", "zone", ")", ";", "}" ]
Returns a new interval based on this interval but with a different time zone id. @param zone the new time zone @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "time", "zone", "id", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L391-L394
49,410
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.getStartDateTime
public LocalDateTime getStartDateTime() { if (startDateTime == null) { startDateTime = LocalDateTime.of(getStartDate(), getStartTime()); } return startDateTime; }
java
public LocalDateTime getStartDateTime() { if (startDateTime == null) { startDateTime = LocalDateTime.of(getStartDate(), getStartTime()); } return startDateTime; }
[ "public", "LocalDateTime", "getStartDateTime", "(", ")", "{", "if", "(", "startDateTime", "==", "null", ")", "{", "startDateTime", "=", "LocalDateTime", ".", "of", "(", "getStartDate", "(", ")", ",", "getStartTime", "(", ")", ")", ";", "}", "return", "star...
Utility method to get the local start date time. This method combines the start date and the start time to create a date time object. @return the start local date time @see #getStartDate() @see #getStartTime()
[ "Utility", "method", "to", "get", "the", "local", "start", "date", "time", ".", "This", "method", "combines", "the", "start", "date", "and", "the", "start", "time", "to", "create", "a", "date", "time", "object", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L404-L410
49,411
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.getEndDateTime
public LocalDateTime getEndDateTime() { if (endDateTime == null) { endDateTime = LocalDateTime.of(getEndDate(), getEndTime()); } return endDateTime; }
java
public LocalDateTime getEndDateTime() { if (endDateTime == null) { endDateTime = LocalDateTime.of(getEndDate(), getEndTime()); } return endDateTime; }
[ "public", "LocalDateTime", "getEndDateTime", "(", ")", "{", "if", "(", "endDateTime", "==", "null", ")", "{", "endDateTime", "=", "LocalDateTime", ".", "of", "(", "getEndDate", "(", ")", ",", "getEndTime", "(", ")", ")", ";", "}", "return", "endDateTime", ...
Utility method to get the local end date time. This method combines the end date and the end time to create a date time object. @return the end local date time @see #getEndDate() @see #getEndTime()
[ "Utility", "method", "to", "get", "the", "local", "end", "date", "time", ".", "This", "method", "combines", "the", "end", "date", "and", "the", "end", "time", "to", "create", "a", "date", "time", "object", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L429-L435
49,412
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/util/Predicates.java
Predicates.not
public static <T> Predicate<T> not(Predicate<? super T> predicate) { assert null != predicate; return new NotPredicate<T>(predicate); }
java
public static <T> Predicate<T> not(Predicate<? super T> predicate) { assert null != predicate; return new NotPredicate<T>(predicate); }
[ "public", "static", "<", "T", ">", "Predicate", "<", "T", ">", "not", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "assert", "null", "!=", "predicate", ";", "return", "new", "NotPredicate", "<", "T", ">", "(", "predicate", ")...
Returns a Predicate that evaluates to true iff the given Predicate evaluates to false.
[ "Returns", "a", "Predicate", "that", "evaluates", "to", "true", "iff", "the", "given", "Predicate", "evaluates", "to", "false", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/util/Predicates.java#L53-L56
49,413
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/values/AbstractIcalObject.java
AbstractIcalObject.parse
protected void parse(String icalString, IcalSchema schema) throws ParseException { String paramText; String content; { String unfolded = IcalParseUtil.unfoldIcal(icalString); Matcher m = CONTENT_LINE_RE.matcher(unfolded); if (!m.matches()) { ...
java
protected void parse(String icalString, IcalSchema schema) throws ParseException { String paramText; String content; { String unfolded = IcalParseUtil.unfoldIcal(icalString); Matcher m = CONTENT_LINE_RE.matcher(unfolded); if (!m.matches()) { ...
[ "protected", "void", "parse", "(", "String", "icalString", ",", "IcalSchema", "schema", ")", "throws", "ParseException", "{", "String", "paramText", ";", "String", "content", ";", "{", "String", "unfolded", "=", "IcalParseUtil", ".", "unfoldIcal", "(", "icalStri...
parse the ical object from the given ical content using the given schema. Modifies the current object in place. @param schema rules for processing individual parameters and body content.
[ "parse", "the", "ical", "object", "from", "the", "given", "ical", "content", "using", "the", "given", "schema", ".", "Modifies", "the", "current", "object", "in", "place", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/AbstractIcalObject.java#L56-L97
49,414
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/values/AbstractIcalObject.java
AbstractIcalObject.getExtParams
public Map<String, String> getExtParams() { if (null == extParams) { extParams = new LinkedHashMap<String, String>(); } return extParams; }
java
public Map<String, String> getExtParams() { if (null == extParams) { extParams = new LinkedHashMap<String, String>(); } return extParams; }
[ "public", "Map", "<", "String", ",", "String", ">", "getExtParams", "(", ")", "{", "if", "(", "null", "==", "extParams", ")", "{", "extParams", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", ")", ";", "}", "return", "extParams", ...
a map of any extension parameters such as the X-FOO=BAR in RRULE;X-FOO=BAR. Maps the parameter name, X-FOO, to the parameter value, BAR.
[ "a", "map", "of", "any", "extension", "parameters", "such", "as", "the", "X", "-", "FOO", "=", "BAR", "in", "RRULE", ";", "X", "-", "FOO", "=", "BAR", ".", "Maps", "the", "parameter", "name", "X", "-", "FOO", "to", "the", "parameter", "value", "BAR...
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/AbstractIcalObject.java#L113-L118
49,415
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/iter/RRuleIteratorImpl.java
RRuleIteratorImpl.next
public DateValue next() { if (null == this.pendingUtc_) { this.fetchNext(); } DateValue next = this.pendingUtc_; this.pendingUtc_ = null; return next; }
java
public DateValue next() { if (null == this.pendingUtc_) { this.fetchNext(); } DateValue next = this.pendingUtc_; this.pendingUtc_ = null; return next; }
[ "public", "DateValue", "next", "(", ")", "{", "if", "(", "null", "==", "this", ".", "pendingUtc_", ")", "{", "this", ".", "fetchNext", "(", ")", ";", "}", "DateValue", "next", "=", "this", ".", "pendingUtc_", ";", "this", ".", "pendingUtc_", "=", "nu...
fetch and return the next date in this recurrence.
[ "fetch", "and", "return", "the", "next", "date", "in", "this", "recurrence", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RRuleIteratorImpl.java#L175-L182
49,416
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/util/DTBuilder.java
DTBuilder.toDateTime
public DateTimeValue toDateTime() { normalize(); return new DateTimeValueImpl(year, month, day, hour, minute, second); }
java
public DateTimeValue toDateTime() { normalize(); return new DateTimeValueImpl(year, month, day, hour, minute, second); }
[ "public", "DateTimeValue", "toDateTime", "(", ")", "{", "normalize", "(", ")", ";", "return", "new", "DateTimeValueImpl", "(", "year", ",", "month", ",", "day", ",", "hour", ",", "minute", ",", "second", ")", ";", "}" ]
produces a normalized date time, using zero for the time fields if none were provided. @return not null
[ "produces", "a", "normalized", "date", "time", "using", "zero", "for", "the", "time", "fields", "if", "none", "were", "provided", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/util/DTBuilder.java#L83-L86
49,417
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.getProperties
public final ObservableMap<Object, Object> getProperties() { if (properties == null) { properties = FXCollections.observableMap(new HashMap<>()); MapChangeListener<? super Object, ? super Object> changeListener = change -> { if (change.getKey().equals("com.calendarfx.rec...
java
public final ObservableMap<Object, Object> getProperties() { if (properties == null) { properties = FXCollections.observableMap(new HashMap<>()); MapChangeListener<? super Object, ? super Object> changeListener = change -> { if (change.getKey().equals("com.calendarfx.rec...
[ "public", "final", "ObservableMap", "<", "Object", ",", "Object", ">", "getProperties", "(", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "properties", "=", "FXCollections", ".", "observableMap", "(", "new", "HashMap", "<>", "(", ")", ")", ...
Returns an observable map of properties on this entry for use primarily by application developers. @return an observable map of properties on this entry for use primarily by application developers
[ "Returns", "an", "observable", "map", "of", "properties", "on", "this", "entry", "for", "use", "primarily", "by", "application", "developers", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L160-L185
49,418
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.changeStartDate
public final void changeStartDate(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(date); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) { ...
java
public final void changeStartDate(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(date); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) { ...
[ "public", "final", "void", "changeStartDate", "(", "LocalDate", "date", ",", "boolean", "keepDuration", ")", "{", "requireNonNull", "(", "date", ")", ";", "Interval", "interval", "=", "getInterval", "(", ")", ";", "LocalDateTime", "newStartDateTime", "=", "getSt...
Changes the start date of the entry interval. @param date the new start date @param keepDuration if true then this method will also change the end date and time in such a way that the total duration of the entry will not change. If false then this method will ensure that the entry's interval stays valid, which...
[ "Changes", "the", "start", "date", "of", "the", "entry", "interval", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L397-L419
49,419
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.changeStartTime
public final void changeStartTime(LocalTime time, boolean keepDuration) { requireNonNull(time); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(time); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) { ...
java
public final void changeStartTime(LocalTime time, boolean keepDuration) { requireNonNull(time); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(time); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) { ...
[ "public", "final", "void", "changeStartTime", "(", "LocalTime", "time", ",", "boolean", "keepDuration", ")", "{", "requireNonNull", "(", "time", ")", ";", "Interval", "interval", "=", "getInterval", "(", ")", ";", "LocalDateTime", "newStartDateTime", "=", "getSt...
Changes the start time of the entry interval. @param time the new start time @param keepDuration if true then this method will also change the end time in such a way that the total duration of the entry will not change. If false then this method will ensure that the entry's interval stays valid, which means th...
[ "Changes", "the", "start", "time", "of", "the", "entry", "interval", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L441-L462
49,420
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.changeEndDate
public final void changeEndDate(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newEndDateTime = getEndAsLocalDateTime().with(date); LocalDateTime startDateTime = getStartAsLocalDateTime(); if (keepDuration) { ...
java
public final void changeEndDate(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newEndDateTime = getEndAsLocalDateTime().with(date); LocalDateTime startDateTime = getStartAsLocalDateTime(); if (keepDuration) { ...
[ "public", "final", "void", "changeEndDate", "(", "LocalDate", "date", ",", "boolean", "keepDuration", ")", "{", "requireNonNull", "(", "date", ")", ";", "Interval", "interval", "=", "getInterval", "(", ")", ";", "LocalDateTime", "newEndDateTime", "=", "getEndAsL...
Changes the end date of the entry interval. @param date the new end date @param keepDuration if true then this method will also change the start date and time in such a way that the total duration of the entry will not change. If false then this method will ensure that the entry's interval stays valid, which m...
[ "Changes", "the", "end", "date", "of", "the", "entry", "interval", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L484-L505
49,421
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.changeEndTime
public final void changeEndTime(LocalTime time, boolean keepDuration) { requireNonNull(time); Interval interval = getInterval(); LocalDateTime newEndDateTime = getEndAsLocalDateTime().with(time); LocalDateTime startDateTime = getStartAsLocalDateTime(); if (keepDuration) { ...
java
public final void changeEndTime(LocalTime time, boolean keepDuration) { requireNonNull(time); Interval interval = getInterval(); LocalDateTime newEndDateTime = getEndAsLocalDateTime().with(time); LocalDateTime startDateTime = getStartAsLocalDateTime(); if (keepDuration) { ...
[ "public", "final", "void", "changeEndTime", "(", "LocalTime", "time", ",", "boolean", "keepDuration", ")", "{", "requireNonNull", "(", "time", ")", ";", "Interval", "interval", "=", "getInterval", "(", ")", ";", "LocalDateTime", "newEndDateTime", "=", "getEndAsL...
Changes the end time of the entry interval. @param time the new end time @param keepDuration if true then this method will also change the start time in such a way that the total duration of the entry will not change. If false then this method will ensure that the entry's interval stays valid, which means that...
[ "Changes", "the", "end", "time", "of", "the", "entry", "interval", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L527-L548
49,422
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.isRecurring
public final boolean isRecurring() { return recurrenceRule != null && !(recurrenceRule.get() == null) && !recurrenceRule.get().trim().equals(""); //$NON-NLS-1$ }
java
public final boolean isRecurring() { return recurrenceRule != null && !(recurrenceRule.get() == null) && !recurrenceRule.get().trim().equals(""); //$NON-NLS-1$ }
[ "public", "final", "boolean", "isRecurring", "(", ")", "{", "return", "recurrenceRule", "!=", "null", "&&", "!", "(", "recurrenceRule", ".", "get", "(", ")", "==", "null", ")", "&&", "!", "recurrenceRule", ".", "get", "(", ")", ".", "trim", "(", ")", ...
Determines if the entry describes a recurring event. @return true if the entry is recurring @see #recurrenceRuleProperty()
[ "Determines", "if", "the", "entry", "describes", "a", "recurring", "event", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L645-L647
49,423
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.recurrenceEndProperty
public final ReadOnlyObjectProperty<LocalDate> recurrenceEndProperty() { if (recurrenceEnd == null) { recurrenceEnd = new ReadOnlyObjectWrapper<>(this, "recurrenceEnd", _recurrenceEnd); //$NON-NLS-1$ } return recurrenceEnd.getReadOnlyProperty(); }
java
public final ReadOnlyObjectProperty<LocalDate> recurrenceEndProperty() { if (recurrenceEnd == null) { recurrenceEnd = new ReadOnlyObjectWrapper<>(this, "recurrenceEnd", _recurrenceEnd); //$NON-NLS-1$ } return recurrenceEnd.getReadOnlyProperty(); }
[ "public", "final", "ReadOnlyObjectProperty", "<", "LocalDate", ">", "recurrenceEndProperty", "(", ")", "{", "if", "(", "recurrenceEnd", "==", "null", ")", "{", "recurrenceEnd", "=", "new", "ReadOnlyObjectWrapper", "<>", "(", "this", ",", "\"recurrenceEnd\"", ",", ...
The property used to store the end time of the recurrence rule. @return the recurrence rule end time @see #recurrenceRuleProperty()
[ "The", "property", "used", "to", "store", "the", "end", "time", "of", "the", "recurrence", "rule", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L786-L792
49,424
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.setId
public final void setId(String id) { requireNonNull(id); if (MODEL.isLoggable(FINE)) { MODEL.fine("setting id to " + id); //$NON-NLS-1$ } this.id = id; }
java
public final void setId(String id) { requireNonNull(id); if (MODEL.isLoggable(FINE)) { MODEL.fine("setting id to " + id); //$NON-NLS-1$ } this.id = id; }
[ "public", "final", "void", "setId", "(", "String", "id", ")", "{", "requireNonNull", "(", "id", ")", ";", "if", "(", "MODEL", ".", "isLoggable", "(", "FINE", ")", ")", "{", "MODEL", ".", "fine", "(", "\"setting id to \"", "+", "id", ")", ";", "//$NON...
Assigns a new ID to the entry. IDs do not have to be unique. If several entries share the same ID it means that they are representing the same "real world" entry. An entry spanning multiple days will be shown via several entries in the month view. Clicking on one of them will select all of them as they all represent th...
[ "Assigns", "a", "new", "ID", "to", "the", "entry", ".", "IDs", "do", "not", "have", "to", "be", "unique", ".", "If", "several", "entries", "share", "the", "same", "ID", "it", "means", "that", "they", "are", "representing", "the", "same", "real", "world...
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L820-L826
49,425
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.userObjectProperty
public final ObjectProperty<T> userObjectProperty() { if (userObject == null) { userObject = new SimpleObjectProperty<T>(this, "userObject") { //$NON-NLS-1$ @Override public void set(T newObject) { T oldUserObject = get(); // W...
java
public final ObjectProperty<T> userObjectProperty() { if (userObject == null) { userObject = new SimpleObjectProperty<T>(this, "userObject") { //$NON-NLS-1$ @Override public void set(T newObject) { T oldUserObject = get(); // W...
[ "public", "final", "ObjectProperty", "<", "T", ">", "userObjectProperty", "(", ")", "{", "if", "(", "userObject", "==", "null", ")", "{", "userObject", "=", "new", "SimpleObjectProperty", "<", "T", ">", "(", "this", ",", "\"userObject\"", ")", "{", "//$NON...
A property used to store a reference to an optional user object. The user object is usually the reason why the entry was created. @return the user object property
[ "A", "property", "used", "to", "store", "a", "reference", "to", "an", "optional", "user", "object", ".", "The", "user", "object", "is", "usually", "the", "reason", "why", "the", "entry", "was", "created", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L918-L940
49,426
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.zoneIdProperty
public final ReadOnlyObjectProperty<ZoneId> zoneIdProperty() { if (zoneId == null) { zoneId = new ReadOnlyObjectWrapper<>(this, "zoneId", getInterval().getZoneId()); //$NON-NLS-1$ } return zoneId.getReadOnlyProperty(); }
java
public final ReadOnlyObjectProperty<ZoneId> zoneIdProperty() { if (zoneId == null) { zoneId = new ReadOnlyObjectWrapper<>(this, "zoneId", getInterval().getZoneId()); //$NON-NLS-1$ } return zoneId.getReadOnlyProperty(); }
[ "public", "final", "ReadOnlyObjectProperty", "<", "ZoneId", ">", "zoneIdProperty", "(", ")", "{", "if", "(", "zoneId", "==", "null", ")", "{", "zoneId", "=", "new", "ReadOnlyObjectWrapper", "<>", "(", "this", ",", "\"zoneId\"", ",", "getInterval", "(", ")", ...
A property used to store a time zone for the entry. The time zone is needed for properly interpreting the dates and times of the entry. @return the time zone property
[ "A", "property", "used", "to", "store", "a", "time", "zone", "for", "the", "entry", ".", "The", "time", "zone", "is", "needed", "for", "properly", "interpreting", "the", "dates", "and", "times", "of", "the", "entry", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L976-L982
49,427
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.locationProperty
public final StringProperty locationProperty() { if (location == null) { location = new SimpleStringProperty(null, "location") { //$NON-NLS-1$ @Override public void set(String newLocation) { String oldLocation = get(); if (!Uti...
java
public final StringProperty locationProperty() { if (location == null) { location = new SimpleStringProperty(null, "location") { //$NON-NLS-1$ @Override public void set(String newLocation) { String oldLocation = get(); if (!Uti...
[ "public", "final", "StringProperty", "locationProperty", "(", ")", "{", "if", "(", "location", "==", "null", ")", "{", "location", "=", "new", "SimpleStringProperty", "(", "null", ",", "\"location\"", ")", "{", "//$NON-NLS-1$", "@", "Override", "public", "void...
A property used to store a free-text location specification for the given entry. This could be as simple as "New York" or a full address as in "128 Madison Avenue, New York, USA". @return the location of the event specified by the entry
[ "A", "property", "used", "to", "store", "a", "free", "-", "text", "location", "specification", "for", "the", "given", "entry", ".", "This", "could", "be", "as", "simple", "as", "New", "York", "or", "a", "full", "address", "as", "in", "128", "Madison", ...
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L1062-L1083
49,428
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Entry.java
Entry.isShowing
public final boolean isShowing(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { return isShowing(this, startDate, endDate, zoneId); }
java
public final boolean isShowing(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { return isShowing(this, startDate, endDate, zoneId); }
[ "public", "final", "boolean", "isShowing", "(", "LocalDate", "startDate", ",", "LocalDate", "endDate", ",", "ZoneId", "zoneId", ")", "{", "return", "isShowing", "(", "this", ",", "startDate", ",", "endDate", ",", "zoneId", ")", ";", "}" ]
Checks whether the entry will be visible within the given start and end dates. This method takes recurrence into consideration and will return true if any recurrence of this entry will be displayed inside the given time interval. @param startDate the start date of the search interval @param endDate the end date of t...
[ "Checks", "whether", "the", "entry", "will", "be", "visible", "within", "the", "given", "start", "and", "end", "dates", ".", "This", "method", "takes", "recurrence", "into", "consideration", "and", "will", "return", "true", "if", "any", "recurrence", "of", "...
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L1487-L1489
49,429
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/EdgeEffect.java
EdgeEffect.setSize
public void setSize(int width, int height) { final float r = width * 0.75f / SIN; final float y = COS * r; final float h = r - y; final float or = height * 0.75f / SIN; final float oy = COS * or; final float oh = or - oy; mRadius = r; mBaseGlowScale = h >...
java
public void setSize(int width, int height) { final float r = width * 0.75f / SIN; final float y = COS * r; final float h = r - y; final float or = height * 0.75f / SIN; final float oy = COS * or; final float oh = or - oy; mRadius = r; mBaseGlowScale = h >...
[ "public", "void", "setSize", "(", "int", "width", ",", "int", "height", ")", "{", "final", "float", "r", "=", "width", "*", "0.75f", "/", "SIN", ";", "final", "float", "y", "=", "COS", "*", "r", ";", "final", "float", "h", "=", "r", "-", "y", "...
Set the size of this edge effect in pixels. @param width Effect width in pixels @param height Effect height in pixels
[ "Set", "the", "size", "of", "this", "edge", "effect", "in", "pixels", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/EdgeEffect.java#L87-L99
49,430
ZieIony/Carbon
carbon/src/main/java/carbon/internal/Menu.java
Menu.createNewMenuItem
private MenuItem createNewMenuItem(int group, int id, int categoryOrder, int ordering, CharSequence title, int defaultShowAsAction) { return new MenuItem(group, id, categoryOrder, title); }
java
private MenuItem createNewMenuItem(int group, int id, int categoryOrder, int ordering, CharSequence title, int defaultShowAsAction) { return new MenuItem(group, id, categoryOrder, title); }
[ "private", "MenuItem", "createNewMenuItem", "(", "int", "group", ",", "int", "id", ",", "int", "categoryOrder", ",", "int", "ordering", ",", "CharSequence", "title", ",", "int", "defaultShowAsAction", ")", "{", "return", "new", "MenuItem", "(", "group", ",", ...
Layoutlib overrides this method to return its custom implementation of MenuItem
[ "Layoutlib", "overrides", "this", "method", "to", "return", "its", "custom", "implementation", "of", "MenuItem" ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/Menu.java#L258-L261
49,431
ZieIony/Carbon
carbon/src/main/java/carbon/internal/Menu.java
Menu.getOrdering
private static int getOrdering(int categoryOrder) { final int index = (categoryOrder & CATEGORY_MASK) >> CATEGORY_SHIFT; if (index < 0 || index >= sCategoryToOrder.length) { throw new IllegalArgumentException("order does not contain a valid category."); } return (sCategoryT...
java
private static int getOrdering(int categoryOrder) { final int index = (categoryOrder & CATEGORY_MASK) >> CATEGORY_SHIFT; if (index < 0 || index >= sCategoryToOrder.length) { throw new IllegalArgumentException("order does not contain a valid category."); } return (sCategoryT...
[ "private", "static", "int", "getOrdering", "(", "int", "categoryOrder", ")", "{", "final", "int", "index", "=", "(", "categoryOrder", "&", "CATEGORY_MASK", ")", ">>", "CATEGORY_SHIFT", ";", "if", "(", "index", "<", "0", "||", "index", ">=", "sCategoryToOrder...
Returns the ordering across all items. This will grab the category from the upper bits, find out how to order the category with respect to other categories, and combine it with the lower bits. @param categoryOrder The category order for a particular item (if it has not been or/add with a category, the default category...
[ "Returns", "the", "ordering", "across", "all", "items", ".", "This", "will", "grab", "the", "category", "from", "the", "upper", "bits", "find", "out", "how", "to", "order", "the", "category", "with", "respect", "to", "other", "categories", "and", "combine", ...
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/Menu.java#L528-L536
49,432
ZieIony/Carbon
carbon/src/main/java/carbon/CarbonResources.java
CarbonResources.createFromStream
public Drawable createFromStream(InputStream is, String srcName) { return createFromResourceStream(null, is, srcName); }
java
public Drawable createFromStream(InputStream is, String srcName) { return createFromResourceStream(null, is, srcName); }
[ "public", "Drawable", "createFromStream", "(", "InputStream", "is", ",", "String", "srcName", ")", "{", "return", "createFromResourceStream", "(", "null", ",", "is", ",", "srcName", ")", ";", "}" ]
Create a drawable from an inputstream
[ "Create", "a", "drawable", "from", "an", "inputstream" ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/CarbonResources.java#L91-L93
49,433
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/MaterialShapeDrawable.java
MaterialShapeDrawable.drawShape
private void drawShape( Canvas canvas, Paint paint, Path path, ShapeAppearanceModel shapeAppearanceModel, RectF bounds) { if (shapeAppearanceModel.isRoundRect()) { float cornerSize = shapeAppearanceModel.getTopRightCorner().getCornerSize();...
java
private void drawShape( Canvas canvas, Paint paint, Path path, ShapeAppearanceModel shapeAppearanceModel, RectF bounds) { if (shapeAppearanceModel.isRoundRect()) { float cornerSize = shapeAppearanceModel.getTopRightCorner().getCornerSize();...
[ "private", "void", "drawShape", "(", "Canvas", "canvas", ",", "Paint", "paint", ",", "Path", "path", ",", "ShapeAppearanceModel", "shapeAppearanceModel", ",", "RectF", "bounds", ")", "{", "if", "(", "shapeAppearanceModel", ".", "isRoundRect", "(", ")", ")", "{...
Draw the path or try to draw a round rect if possible.
[ "Draw", "the", "path", "or", "try", "to", "draw", "a", "round", "rect", "if", "possible", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/MaterialShapeDrawable.java#L353-L365
49,434
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/MaterialShapeDrawable.java
MaterialShapeDrawable.drawCompatShadow
private void drawCompatShadow(Canvas canvas) { // Draw the fake shadow for each of the corners and edges. for (int index = 0; index < 4; index++) { cornerShadowOperation[index].draw(shadowRenderer, drawableState.shadowCompatRadius, canvas); edgeShadowOperation[index].draw(shadow...
java
private void drawCompatShadow(Canvas canvas) { // Draw the fake shadow for each of the corners and edges. for (int index = 0; index < 4; index++) { cornerShadowOperation[index].draw(shadowRenderer, drawableState.shadowCompatRadius, canvas); edgeShadowOperation[index].draw(shadow...
[ "private", "void", "drawCompatShadow", "(", "Canvas", "canvas", ")", "{", "// Draw the fake shadow for each of the corners and edges.", "for", "(", "int", "index", "=", "0", ";", "index", "<", "4", ";", "index", "++", ")", "{", "cornerShadowOperation", "[", "index...
Draws a shadow using gradients which can be used in the cases where native elevation can't. This draws the shadow in multiple parts. It draws the shadow for each corner and edge separately. Then it fills in the center space with the main shadow colored paint. If there is no shadow offset, this will skip the drawing of ...
[ "Draws", "a", "shadow", "using", "gradients", "which", "can", "be", "used", "in", "the", "cases", "where", "native", "elevation", "can", "t", ".", "This", "draws", "the", "shadow", "in", "multiple", "parts", ".", "It", "draws", "the", "shadow", "for", "e...
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/MaterialShapeDrawable.java#L378-L385
49,435
ZieIony/Carbon
carbon/src/main/java/carbon/widget/CheckBox.java
CheckBox.setButtonDrawable
public void setButtonDrawable(Drawable d) { if (drawable != d) { if (drawable != null) { drawable.setCallback(null); unscheduleDrawable(drawable); } drawable = d; if (d != null) { d.setCallback(this); ...
java
public void setButtonDrawable(Drawable d) { if (drawable != d) { if (drawable != null) { drawable.setCallback(null); unscheduleDrawable(drawable); } drawable = d; if (d != null) { d.setCallback(this); ...
[ "public", "void", "setButtonDrawable", "(", "Drawable", "d", ")", "{", "if", "(", "drawable", "!=", "d", ")", "{", "if", "(", "drawable", "!=", "null", ")", "{", "drawable", ".", "setCallback", "(", "null", ")", ";", "unscheduleDrawable", "(", "drawable"...
Set the button graphic to a given Drawable @param d The Drawable to use as the button graphic
[ "Set", "the", "button", "graphic", "to", "a", "given", "Drawable" ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/widget/CheckBox.java#L190-L210
49,436
ZieIony/Carbon
carbon/src/main/java/carbon/animation/StateAnimator.java
StateAnimator.addState
public void addState(int[] specs, Animator animation, Animator.AnimatorListener listener) { Tuple tuple = new Tuple(specs, animation, listener); animation.addListener(mAnimationListener); mTuples.add(tuple); }
java
public void addState(int[] specs, Animator animation, Animator.AnimatorListener listener) { Tuple tuple = new Tuple(specs, animation, listener); animation.addListener(mAnimationListener); mTuples.add(tuple); }
[ "public", "void", "addState", "(", "int", "[", "]", "specs", ",", "Animator", "animation", ",", "Animator", ".", "AnimatorListener", "listener", ")", "{", "Tuple", "tuple", "=", "new", "Tuple", "(", "specs", ",", "animation", ",", "listener", ")", ";", "...
Associates the given Animation with the provided drawable state specs so that it will be run when the View's drawable state matches the specs. @param specs drawable state specs to match against @param animation The Animation to run when the specs match
[ "Associates", "the", "given", "Animation", "with", "the", "provided", "drawable", "state", "specs", "so", "that", "it", "will", "be", "run", "when", "the", "View", "s", "drawable", "state", "matches", "the", "specs", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/animation/StateAnimator.java#L55-L59
49,437
ZieIony/Carbon
carbon/src/main/java/carbon/animation/StateAnimator.java
StateAnimator.setState
public void setState(int[] state) { Tuple match = null; final int count = mTuples.size(); for (int i = 0; i < count; i++) { final Tuple tuple = mTuples.get(i); if (StateSet.stateSetMatches(tuple.mSpecs, state)) { match = tuple; break; ...
java
public void setState(int[] state) { Tuple match = null; final int count = mTuples.size(); for (int i = 0; i < count; i++) { final Tuple tuple = mTuples.get(i); if (StateSet.stateSetMatches(tuple.mSpecs, state)) { match = tuple; break; ...
[ "public", "void", "setState", "(", "int", "[", "]", "state", ")", "{", "Tuple", "match", "=", "null", ";", "final", "int", "count", "=", "mTuples", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "count", ";", "i", ...
Called by View
[ "Called", "by", "View" ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/animation/StateAnimator.java#L105-L128
49,438
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java
LollipopDrawablesCompat.applyTheme
public static void applyTheme(Drawable d, Resources.Theme t) { IMPL.applyTheme(d, t); }
java
public static void applyTheme(Drawable d, Resources.Theme t) { IMPL.applyTheme(d, t); }
[ "public", "static", "void", "applyTheme", "(", "Drawable", "d", ",", "Resources", ".", "Theme", "t", ")", "{", "IMPL", ".", "applyTheme", "(", "d", ",", "t", ")", ";", "}" ]
Applies the specified theme to this Drawable and its children.
[ "Applies", "the", "specified", "theme", "to", "this", "Drawable", "and", "its", "children", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java#L62-L64
49,439
ZieIony/Carbon
carbon/src/main/java/carbon/internal/PercentLayoutHelper.java
PercentLayoutHelper.adjustChildren
public void adjustChildren(int widthMeasureSpec, int heightMeasureSpec) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "adjustChildren: " + mHost + " widthMeasureSpec: " + View.MeasureSpec.toString(widthMeasureSpec) + " heightMeasureSpec: " + View.MeasureS...
java
public void adjustChildren(int widthMeasureSpec, int heightMeasureSpec) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "adjustChildren: " + mHost + " widthMeasureSpec: " + View.MeasureSpec.toString(widthMeasureSpec) + " heightMeasureSpec: " + View.MeasureS...
[ "public", "void", "adjustChildren", "(", "int", "widthMeasureSpec", ",", "int", "heightMeasureSpec", ")", "{", "if", "(", "Log", ".", "isLoggable", "(", "TAG", ",", "Log", ".", "DEBUG", ")", ")", "{", "Log", ".", "d", "(", "TAG", ",", "\"adjustChildren: ...
Iterates over children and changes their width and height to one calculated from percentage values. @param widthMeasureSpec Width MeasureSpec of the parent ViewGroup. @param heightMeasureSpec Height MeasureSpec of the parent ViewGroup.
[ "Iterates", "over", "children", "and", "changes", "their", "width", "and", "height", "to", "one", "calculated", "from", "percentage", "values", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/PercentLayoutHelper.java#L59-L90
49,440
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleComponent.java
RippleComponent.enter
public final void enter(boolean fast) { cancel(); mSoftwareAnimator = createSoftwareEnter(fast); if (mSoftwareAnimator != null) { mSoftwareAnimator.start(); } }
java
public final void enter(boolean fast) { cancel(); mSoftwareAnimator = createSoftwareEnter(fast); if (mSoftwareAnimator != null) { mSoftwareAnimator.start(); } }
[ "public", "final", "void", "enter", "(", "boolean", "fast", ")", "{", "cancel", "(", ")", ";", "mSoftwareAnimator", "=", "createSoftwareEnter", "(", "fast", ")", ";", "if", "(", "mSoftwareAnimator", "!=", "null", ")", "{", "mSoftwareAnimator", ".", "start", ...
Starts a ripple enter animation. @param fast whether the ripple should enter quickly
[ "Starts", "a", "ripple", "enter", "animation", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleComponent.java#L73-L81
49,441
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapePath.java
ShapePath.lineTo
public void lineTo(float x, float y) { PathLineOperation operation = new PathLineOperation(); operation.x = x; operation.y = y; operations.add(operation); LineShadowOperation shadowOperation = new LineShadowOperation(operation, endX, endY); // The previous endX and endY...
java
public void lineTo(float x, float y) { PathLineOperation operation = new PathLineOperation(); operation.x = x; operation.y = y; operations.add(operation); LineShadowOperation shadowOperation = new LineShadowOperation(operation, endX, endY); // The previous endX and endY...
[ "public", "void", "lineTo", "(", "float", "x", ",", "float", "y", ")", "{", "PathLineOperation", "operation", "=", "new", "PathLineOperation", "(", ")", ";", "operation", ".", "x", "=", "x", ";", "operation", ".", "y", "=", "y", ";", "operations", ".",...
Add a line to the ShapePath. @param x the x to which the line should be drawn. @param y the y to which the line should be drawn.
[ "Add", "a", "line", "to", "the", "ShapePath", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapePath.java#L79-L95
49,442
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapePath.java
ShapePath.quadToPoint
public void quadToPoint(float controlX, float controlY, float toX, float toY) { PathQuadOperation operation = new PathQuadOperation(); operation.controlX = controlX; operation.controlY = controlY; operation.endX = toX; operation.endY = toY; operations.add(operation); ...
java
public void quadToPoint(float controlX, float controlY, float toX, float toY) { PathQuadOperation operation = new PathQuadOperation(); operation.controlX = controlX; operation.controlY = controlY; operation.endX = toX; operation.endY = toY; operations.add(operation); ...
[ "public", "void", "quadToPoint", "(", "float", "controlX", ",", "float", "controlY", ",", "float", "toX", ",", "float", "toY", ")", "{", "PathQuadOperation", "operation", "=", "new", "PathQuadOperation", "(", ")", ";", "operation", ".", "controlX", "=", "con...
Add a quad to the ShapePath. @param controlX the control point x of the arc. @param controlY the control point y of the arc. @param toX the end x of the arc. @param toY the end y of the arc.
[ "Add", "a", "quad", "to", "the", "ShapePath", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapePath.java#L105-L115
49,443
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapePath.java
ShapePath.addArc
public void addArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle) { PathArcOperation operation = new PathArcOperation(left, top, right, bottom); operation.startAngle = startAngle; operation.sweepAngle = sweepAngle; operations....
java
public void addArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle) { PathArcOperation operation = new PathArcOperation(left, top, right, bottom); operation.startAngle = startAngle; operation.sweepAngle = sweepAngle; operations....
[ "public", "void", "addArc", "(", "float", "left", ",", "float", "top", ",", "float", "right", ",", "float", "bottom", ",", "float", "startAngle", ",", "float", "sweepAngle", ")", "{", "PathArcOperation", "operation", "=", "new", "PathArcOperation", "(", "lef...
Add an arc to the ShapePath. @param left the X coordinate of the left side of the rectangle containing the arc oval. @param top the Y coordinate of the top of the rectangle containing the arc oval. @param right the X coordinate of the right side of the rectangle containing the arc oval. @param bottom...
[ "Add", "an", "arc", "to", "the", "ShapePath", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapePath.java#L129-L151
49,444
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapePath.java
ShapePath.createShadowCompatOperation
ShadowCompatOperation createShadowCompatOperation(final Matrix transform) { // If the shadowCompatOperations don't end on the desired endShadowAngle, add an arc to do so. addConnectingShadowIfNecessary(endShadowAngle); final List<ShadowCompatOperation> operations = new ArrayList<>(shadowCompatOp...
java
ShadowCompatOperation createShadowCompatOperation(final Matrix transform) { // If the shadowCompatOperations don't end on the desired endShadowAngle, add an arc to do so. addConnectingShadowIfNecessary(endShadowAngle); final List<ShadowCompatOperation> operations = new ArrayList<>(shadowCompatOp...
[ "ShadowCompatOperation", "createShadowCompatOperation", "(", "final", "Matrix", "transform", ")", "{", "// If the shadowCompatOperations don't end on the desired endShadowAngle, add an arc to do so.", "addConnectingShadowIfNecessary", "(", "endShadowAngle", ")", ";", "final", "List", ...
Creates a ShadowCompatOperation to draw compatibility shadow under the matrix transform for the whole path defined by this ShapePath.
[ "Creates", "a", "ShadowCompatOperation", "to", "draw", "compatibility", "shadow", "under", "the", "matrix", "transform", "for", "the", "whole", "path", "defined", "by", "this", "ShapePath", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapePath.java#L170-L183
49,445
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.setTargetDensity
private void setTargetDensity(DisplayMetrics metrics) { if (mDensity != metrics.density) { mDensity = metrics.density; invalidateSelf(false); } }
java
private void setTargetDensity(DisplayMetrics metrics) { if (mDensity != metrics.density) { mDensity = metrics.density; invalidateSelf(false); } }
[ "private", "void", "setTargetDensity", "(", "DisplayMetrics", "metrics", ")", "{", "if", "(", "mDensity", "!=", "metrics", ".", "density", ")", "{", "mDensity", "=", "metrics", ".", "density", ";", "invalidateSelf", "(", "false", ")", ";", "}", "}" ]
Set the density at which this drawable will be rendered. @param metrics The display metrics for this drawable.
[ "Set", "the", "density", "at", "which", "this", "drawable", "will", "be", "rendered", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L491-L496
49,446
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.tryBackgroundEnter
private void tryBackgroundEnter(boolean focused) { if (mBackground == null) { mBackground = new RippleBackground(this, mHotspotBounds); } mBackground.setup(mState.mMaxRadius, mDensity); mBackground.enter(focused); }
java
private void tryBackgroundEnter(boolean focused) { if (mBackground == null) { mBackground = new RippleBackground(this, mHotspotBounds); } mBackground.setup(mState.mMaxRadius, mDensity); mBackground.enter(focused); }
[ "private", "void", "tryBackgroundEnter", "(", "boolean", "focused", ")", "{", "if", "(", "mBackground", "==", "null", ")", "{", "mBackground", "=", "new", "RippleBackground", "(", "this", ",", "mHotspotBounds", ")", ";", "}", "mBackground", ".", "setup", "("...
Creates an active hotspot at the specified location.
[ "Creates", "an", "active", "hotspot", "at", "the", "specified", "location", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L547-L554
49,447
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.tryRippleEnter
private void tryRippleEnter() { if (mExitingRipplesCount >= MAX_RIPPLES) { // This should never happen unless the user is tapping like a maniac // or there is a bug that's preventing ripples from being removed. return; } if (mRipple == null) { fin...
java
private void tryRippleEnter() { if (mExitingRipplesCount >= MAX_RIPPLES) { // This should never happen unless the user is tapping like a maniac // or there is a bug that's preventing ripples from being removed. return; } if (mRipple == null) { fin...
[ "private", "void", "tryRippleEnter", "(", ")", "{", "if", "(", "mExitingRipplesCount", ">=", "MAX_RIPPLES", ")", "{", "// This should never happen unless the user is tapping like a maniac", "// or there is a bug that's preventing ripples from being removed.", "return", ";", "}", ...
Attempts to start an enter animation for the active hotspot. Fails if there are too many animating ripples.
[ "Attempts", "to", "start", "an", "enter", "animation", "for", "the", "active", "hotspot", ".", "Fails", "if", "there", "are", "too", "many", "animating", "ripples", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L567-L592
49,448
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.tryRippleExit
private void tryRippleExit() { if (mRipple != null) { if (mExitingRipples == null) { mExitingRipples = new RippleForeground[MAX_RIPPLES]; } mExitingRipples[mExitingRipplesCount++] = mRipple; mRipple.exit(); mRipple = null; } ...
java
private void tryRippleExit() { if (mRipple != null) { if (mExitingRipples == null) { mExitingRipples = new RippleForeground[MAX_RIPPLES]; } mExitingRipples[mExitingRipplesCount++] = mRipple; mRipple.exit(); mRipple = null; } ...
[ "private", "void", "tryRippleExit", "(", ")", "{", "if", "(", "mRipple", "!=", "null", ")", "{", "if", "(", "mExitingRipples", "==", "null", ")", "{", "mExitingRipples", "=", "new", "RippleForeground", "[", "MAX_RIPPLES", "]", ";", "}", "mExitingRipples", ...
Attempts to start an exit animation for the active hotspot. Fails if there is no active hotspot.
[ "Attempts", "to", "start", "an", "exit", "animation", "for", "the", "active", "hotspot", ".", "Fails", "if", "there", "is", "no", "active", "hotspot", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L598-L607
49,449
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.clearHotspots
private void clearHotspots() { if (mRipple != null) { mRipple.end(); mRipple = null; mRippleActive = false; } if (mBackground != null) { mBackground.end(); mBackground = null; mBackgroundActive = false; } c...
java
private void clearHotspots() { if (mRipple != null) { mRipple.end(); mRipple = null; mRippleActive = false; } if (mBackground != null) { mBackground.end(); mBackground = null; mBackgroundActive = false; } c...
[ "private", "void", "clearHotspots", "(", ")", "{", "if", "(", "mRipple", "!=", "null", ")", "{", "mRipple", ".", "end", "(", ")", ";", "mRipple", "=", "null", ";", "mRippleActive", "=", "false", ";", "}", "if", "(", "mBackground", "!=", "null", ")", ...
Cancels and removes the active ripple, all exiting ripples, and the background. Nothing will be drawn after this method is called.
[ "Cancels", "and", "removes", "the", "active", "ripple", "all", "exiting", "ripples", "and", "the", "background", ".", "Nothing", "will", "be", "drawn", "after", "this", "method", "is", "called", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L613-L627
49,450
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java
RippleDrawableICS.onHotspotBoundsChanged
private void onHotspotBoundsChanged() { final int count = mExitingRipplesCount; final RippleForeground[] ripples = mExitingRipples; for (int i = 0; i < count; i++) { ripples[i].onHotspotBoundsChanged(); } if (mRipple != null) { mRipple.onHotspotBoundsChan...
java
private void onHotspotBoundsChanged() { final int count = mExitingRipplesCount; final RippleForeground[] ripples = mExitingRipples; for (int i = 0; i < count; i++) { ripples[i].onHotspotBoundsChanged(); } if (mRipple != null) { mRipple.onHotspotBoundsChan...
[ "private", "void", "onHotspotBoundsChanged", "(", ")", "{", "final", "int", "count", "=", "mExitingRipplesCount", ";", "final", "RippleForeground", "[", "]", "ripples", "=", "mExitingRipples", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "count", ...
Notifies all the animating ripples that the hotspot bounds have changed.
[ "Notifies", "all", "the", "animating", "ripples", "that", "the", "hotspot", "bounds", "have", "changed", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableICS.java#L645-L659
49,451
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShadowRenderer.java
ShadowRenderer.drawEdgeShadow
public void drawEdgeShadow(Canvas canvas, Matrix transform, RectF bounds, int elevation) { bounds.bottom += elevation; bounds.offset(0, -elevation); edgeColors[0] = shadowEndColor; edgeColors[1] = shadowMiddleColor; edgeColors[2] = shadowStartColor; edgeShadowPaint.setS...
java
public void drawEdgeShadow(Canvas canvas, Matrix transform, RectF bounds, int elevation) { bounds.bottom += elevation; bounds.offset(0, -elevation); edgeColors[0] = shadowEndColor; edgeColors[1] = shadowMiddleColor; edgeColors[2] = shadowStartColor; edgeShadowPaint.setS...
[ "public", "void", "drawEdgeShadow", "(", "Canvas", "canvas", ",", "Matrix", "transform", ",", "RectF", "bounds", ",", "int", "elevation", ")", "{", "bounds", ".", "bottom", "+=", "elevation", ";", "bounds", ".", "offset", "(", "0", ",", "-", "elevation", ...
Draws an edge shadow on the canvas in the current bounds with the matrix transform applied.
[ "Draws", "an", "edge", "shadow", "on", "the", "canvas", "in", "the", "current", "bounds", "with", "the", "matrix", "transform", "applied", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShadowRenderer.java#L100-L122
49,452
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShadowRenderer.java
ShadowRenderer.drawCornerShadow
public void drawCornerShadow( Canvas canvas, Matrix matrix, RectF bounds, int elevation, float startAngle, float sweepAngle) { Path arcBounds = scratch; // Calculate the arc bounds to prevent drawing shadow in the same part of the...
java
public void drawCornerShadow( Canvas canvas, Matrix matrix, RectF bounds, int elevation, float startAngle, float sweepAngle) { Path arcBounds = scratch; // Calculate the arc bounds to prevent drawing shadow in the same part of the...
[ "public", "void", "drawCornerShadow", "(", "Canvas", "canvas", ",", "Matrix", "matrix", ",", "RectF", "bounds", ",", "int", "elevation", ",", "float", "startAngle", ",", "float", "sweepAngle", ")", "{", "Path", "arcBounds", "=", "scratch", ";", "// Calculate t...
Draws a corner shadow on the canvas in the current bounds with the matrix transform applied.
[ "Draws", "a", "corner", "shadow", "on", "the", "canvas", "in", "the", "current", "bounds", "with", "the", "matrix", "transform", "applied", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShadowRenderer.java#L127-L171
49,453
ZieIony/Carbon
carbon/src/main/java/carbon/widget/AutoCompleteEditText.java
AutoCompleteEditText.performCompletion
public void performCompletion(String s) { int selStart = getSelectionStart(); int selEnd = getSelectionEnd(); if (selStart != selEnd) return; Editable text = getText(); HintSpan[] spans = text.getSpans(0, length(), HintSpan.class); if (spans.length > 1) ...
java
public void performCompletion(String s) { int selStart = getSelectionStart(); int selEnd = getSelectionEnd(); if (selStart != selEnd) return; Editable text = getText(); HintSpan[] spans = text.getSpans(0, length(), HintSpan.class); if (spans.length > 1) ...
[ "public", "void", "performCompletion", "(", "String", "s", ")", "{", "int", "selStart", "=", "getSelectionStart", "(", ")", ";", "int", "selEnd", "=", "getSelectionEnd", "(", ")", ";", "if", "(", "selStart", "!=", "selEnd", ")", "return", ";", "Editable", ...
Replaces the current word with s. Used by Adapter to set the selected item as text. @param s text to replace with
[ "Replaces", "the", "current", "word", "with", "s", ".", "Used", "by", "Adapter", "to", "set", "the", "selected", "item", "as", "text", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/widget/AutoCompleteEditText.java#L362-L384
49,454
ZieIony/Carbon
carbon/src/main/java/carbon/internal/WeakHashSet.java
WeakHashSet.iterator
public Iterator iterator() { // remove garbage collected elements processQueue(); // get an iterator of the superclass WeakHashSet final Iterator i = super.iterator(); return new Iterator() { public boolean hasNext() { return i.hasNext(); ...
java
public Iterator iterator() { // remove garbage collected elements processQueue(); // get an iterator of the superclass WeakHashSet final Iterator i = super.iterator(); return new Iterator() { public boolean hasNext() { return i.hasNext(); ...
[ "public", "Iterator", "iterator", "(", ")", "{", "// remove garbage collected elements", "processQueue", "(", ")", ";", "// get an iterator of the superclass WeakHashSet", "final", "Iterator", "i", "=", "super", ".", "iterator", "(", ")", ";", "return", "new", "Iterat...
Returns an iterator over the elements in this set. The elements are returned in no particular order. @return an Iterator over the elements in this set.
[ "Returns", "an", "iterator", "over", "the", "elements", "in", "this", "set", ".", "The", "elements", "are", "returned", "in", "no", "particular", "order", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/WeakHashSet.java#L63-L85
49,455
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LollipopDrawable.java
LollipopDrawable.inflate
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException { }
java
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException { }
[ "public", "void", "inflate", "(", "Resources", "r", ",", "XmlPullParser", "parser", ",", "AttributeSet", "attrs", ",", "Resources", ".", "Theme", "theme", ")", "throws", "XmlPullParserException", ",", "IOException", "{", "}" ]
Inflate this Drawable from an XML resource optionally styled by a theme. @param r Resources used to resolve attribute values @param parser XML parser from which to inflate this Drawable @param attrs Base set of attribute values @param theme Theme to apply, may be null @throws XmlPullParserException @throws IOEx...
[ "Inflate", "this", "Drawable", "from", "an", "XML", "resource", "optionally", "styled", "by", "a", "theme", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LollipopDrawable.java#L30-L32
49,456
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java
RippleForeground.getBounds
public void getBounds(Rect bounds) { final int outerX = (int) mTargetX; final int outerY = (int) mTargetY; final int r = (int) mTargetRadius + 1; bounds.set(outerX - r, outerY - r, outerX + r, outerY + r); }
java
public void getBounds(Rect bounds) { final int outerX = (int) mTargetX; final int outerY = (int) mTargetY; final int r = (int) mTargetRadius + 1; bounds.set(outerX - r, outerY - r, outerX + r, outerY + r); }
[ "public", "void", "getBounds", "(", "Rect", "bounds", ")", "{", "final", "int", "outerX", "=", "(", "int", ")", "mTargetX", ";", "final", "int", "outerY", "=", "(", "int", ")", "mTargetY", ";", "final", "int", "r", "=", "(", "int", ")", "mTargetRadiu...
Returns the maximum bounds of the ripple relative to the ripple center.
[ "Returns", "the", "maximum", "bounds", "of", "the", "ripple", "relative", "to", "the", "ripple", "center", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java#L113-L118
49,457
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java
RippleForeground.computeBoundedTargetValues
private void computeBoundedTargetValues() { mTargetX = (mClampedStartingX - mBounds.exactCenterX()) * .7f; mTargetY = (mClampedStartingY - mBounds.exactCenterY()) * .7f; mTargetRadius = mBoundedRadius; }
java
private void computeBoundedTargetValues() { mTargetX = (mClampedStartingX - mBounds.exactCenterX()) * .7f; mTargetY = (mClampedStartingY - mBounds.exactCenterY()) * .7f; mTargetRadius = mBoundedRadius; }
[ "private", "void", "computeBoundedTargetValues", "(", ")", "{", "mTargetX", "=", "(", "mClampedStartingX", "-", "mBounds", ".", "exactCenterX", "(", ")", ")", "*", ".7f", ";", "mTargetY", "=", "(", "mClampedStartingY", "-", "mBounds", ".", "exactCenterY", "(",...
Compute target values that are dependent on bounding.
[ "Compute", "target", "values", "that", "are", "dependent", "on", "bounding", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java#L199-L203
49,458
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java
RippleForeground.clampStartingPosition
private void clampStartingPosition() { final float cX = mBounds.exactCenterX(); final float cY = mBounds.exactCenterY(); final float dX = mStartingX - cX; final float dY = mStartingY - cY; final float r = mTargetRadius; if (dX * dX + dY * dY > r * r) { // Poin...
java
private void clampStartingPosition() { final float cX = mBounds.exactCenterX(); final float cY = mBounds.exactCenterY(); final float dX = mStartingX - cX; final float dY = mStartingY - cY; final float r = mTargetRadius; if (dX * dX + dY * dY > r * r) { // Poin...
[ "private", "void", "clampStartingPosition", "(", ")", "{", "final", "float", "cX", "=", "mBounds", ".", "exactCenterX", "(", ")", ";", "final", "float", "cY", "=", "mBounds", ".", "exactCenterY", "(", ")", ";", "final", "float", "dX", "=", "mStartingX", ...
Clamps the starting position to fit within the ripple bounds.
[ "Clamps", "the", "starting", "position", "to", "fit", "within", "the", "ripple", "bounds", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/RippleForeground.java#L258-L273
49,459
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java
ShapeAppearanceModel.setAllCorners
public void setAllCorners(CornerTreatment cornerTreatment) { topLeftCorner = cornerTreatment.clone(); topRightCorner = cornerTreatment.clone(); bottomRightCorner = cornerTreatment.clone(); bottomLeftCorner = cornerTreatment.clone(); }
java
public void setAllCorners(CornerTreatment cornerTreatment) { topLeftCorner = cornerTreatment.clone(); topRightCorner = cornerTreatment.clone(); bottomRightCorner = cornerTreatment.clone(); bottomLeftCorner = cornerTreatment.clone(); }
[ "public", "void", "setAllCorners", "(", "CornerTreatment", "cornerTreatment", ")", "{", "topLeftCorner", "=", "cornerTreatment", ".", "clone", "(", ")", ";", "topRightCorner", "=", "cornerTreatment", ".", "clone", "(", ")", ";", "bottomRightCorner", "=", "cornerTr...
Sets all corner treatments. @param cornerTreatment the corner treatment to use for all four corners.
[ "Sets", "all", "corner", "treatments", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L147-L152
49,460
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java
ShapeAppearanceModel.setAllEdges
public void setAllEdges(EdgeTreatment edgeTreatment) { leftEdge = edgeTreatment.clone(); topEdge = edgeTreatment.clone(); rightEdge = edgeTreatment.clone(); bottomEdge = edgeTreatment.clone(); }
java
public void setAllEdges(EdgeTreatment edgeTreatment) { leftEdge = edgeTreatment.clone(); topEdge = edgeTreatment.clone(); rightEdge = edgeTreatment.clone(); bottomEdge = edgeTreatment.clone(); }
[ "public", "void", "setAllEdges", "(", "EdgeTreatment", "edgeTreatment", ")", "{", "leftEdge", "=", "edgeTreatment", ".", "clone", "(", ")", ";", "topEdge", "=", "edgeTreatment", ".", "clone", "(", ")", ";", "rightEdge", "=", "edgeTreatment", ".", "clone", "(...
Sets all edge treatments. @param edgeTreatment the edge treatment to use for all four edges.
[ "Sets", "all", "edge", "treatments", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L181-L186
49,461
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java
ShapeAppearanceModel.setCornerTreatments
public void setCornerTreatments( CornerTreatment topLeftCorner, CornerTreatment topRightCorner, CornerTreatment bottomRightCorner, CornerTreatment bottomLeftCorner) { this.topLeftCorner = topLeftCorner; this.topRightCorner = topRightCorner; this.bo...
java
public void setCornerTreatments( CornerTreatment topLeftCorner, CornerTreatment topRightCorner, CornerTreatment bottomRightCorner, CornerTreatment bottomLeftCorner) { this.topLeftCorner = topLeftCorner; this.topRightCorner = topRightCorner; this.bo...
[ "public", "void", "setCornerTreatments", "(", "CornerTreatment", "topLeftCorner", ",", "CornerTreatment", "topRightCorner", ",", "CornerTreatment", "bottomRightCorner", ",", "CornerTreatment", "bottomLeftCorner", ")", "{", "this", ".", "topLeftCorner", "=", "topLeftCorner",...
Sets corner treatments. @param topLeftCorner the corner treatment to use in the top-left corner. @param topRightCorner the corner treatment to use in the top-right corner. @param bottomRightCorner the corner treatment to use in the bottom-right corner. @param bottomLeftCorner the corner treatment to use in the...
[ "Sets", "corner", "treatments", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L196-L205
49,462
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java
ShapeAppearanceModel.setEdgeTreatments
public void setEdgeTreatments( EdgeTreatment leftEdge, EdgeTreatment topEdge, EdgeTreatment rightEdge, EdgeTreatment bottomEdge) { this.leftEdge = leftEdge; this.topEdge = topEdge; this.rightEdge = rightEdge; this.bottomEdge = bottomEdge; ...
java
public void setEdgeTreatments( EdgeTreatment leftEdge, EdgeTreatment topEdge, EdgeTreatment rightEdge, EdgeTreatment bottomEdge) { this.leftEdge = leftEdge; this.topEdge = topEdge; this.rightEdge = rightEdge; this.bottomEdge = bottomEdge; ...
[ "public", "void", "setEdgeTreatments", "(", "EdgeTreatment", "leftEdge", ",", "EdgeTreatment", "topEdge", ",", "EdgeTreatment", "rightEdge", ",", "EdgeTreatment", "bottomEdge", ")", "{", "this", ".", "leftEdge", "=", "leftEdge", ";", "this", ".", "topEdge", "=", ...
Sets edge treatments. @param leftEdge the edge treatment to use on the left edge. @param topEdge the edge treatment to use on the top edge. @param rightEdge the edge treatment to use on the right edge. @param bottomEdge the edge treatment to use on the bottom edge.
[ "Sets", "edge", "treatments", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L215-L224
49,463
ZieIony/Carbon
carbon/src/main/java/carbon/recycler/ItemTouchHelper.java
ItemTouchHelper.scrollIfNecessary
boolean scrollIfNecessary() { if (mSelected == null) { mDragScrollStartTimeInMs = Long.MIN_VALUE; return false; } final long now = System.currentTimeMillis(); final long scrollDuration = mDragScrollStartTimeInMs == Long.MIN_VALUE ? 0 : now - mDragS...
java
boolean scrollIfNecessary() { if (mSelected == null) { mDragScrollStartTimeInMs = Long.MIN_VALUE; return false; } final long now = System.currentTimeMillis(); final long scrollDuration = mDragScrollStartTimeInMs == Long.MIN_VALUE ? 0 : now - mDragS...
[ "boolean", "scrollIfNecessary", "(", ")", "{", "if", "(", "mSelected", "==", "null", ")", "{", "mDragScrollStartTimeInMs", "=", "Long", ".", "MIN_VALUE", ";", "return", "false", ";", "}", "final", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ...
If user drags the view to the edge, trigger a scroll if necessary.
[ "If", "user", "drags", "the", "view", "to", "the", "edge", "trigger", "a", "scroll", "if", "necessary", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/recycler/ItemTouchHelper.java#L658-L719
49,464
ZieIony/Carbon
carbon/src/main/java/carbon/recycler/ItemTouchHelper.java
ItemTouchHelper.endRecoverAnimation
int endRecoverAnimation(ViewHolder viewHolder, boolean override) { final int recoverAnimSize = mRecoverAnimations.size(); for (int i = recoverAnimSize - 1; i >= 0; i--) { final RecoverAnimation anim = mRecoverAnimations.get(i); if (anim.mViewHolder == viewHolder) { ...
java
int endRecoverAnimation(ViewHolder viewHolder, boolean override) { final int recoverAnimSize = mRecoverAnimations.size(); for (int i = recoverAnimSize - 1; i >= 0; i--) { final RecoverAnimation anim = mRecoverAnimations.get(i); if (anim.mViewHolder == viewHolder) { ...
[ "int", "endRecoverAnimation", "(", "ViewHolder", "viewHolder", ",", "boolean", "override", ")", "{", "final", "int", "recoverAnimSize", "=", "mRecoverAnimations", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "recoverAnimSize", "-", "1", ";", "i",...
Returns the animation type or 0 if cannot be found.
[ "Returns", "the", "animation", "type", "or", "0", "if", "cannot", "be", "found", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/recycler/ItemTouchHelper.java#L831-L845
49,465
ZieIony/Carbon
carbon/src/main/java/carbon/recycler/ItemTouchHelper.java
ItemTouchHelper.checkSelectForSwipe
boolean checkSelectForSwipe(int action, MotionEvent motionEvent, int pointerIndex) { if (mSelected != null || action != MotionEvent.ACTION_MOVE || mActionState == ACTION_STATE_DRAG || !mCallback.isItemViewSwipeEnabled()) { return false; } if (mRecyclerView.getScrollSt...
java
boolean checkSelectForSwipe(int action, MotionEvent motionEvent, int pointerIndex) { if (mSelected != null || action != MotionEvent.ACTION_MOVE || mActionState == ACTION_STATE_DRAG || !mCallback.isItemViewSwipeEnabled()) { return false; } if (mRecyclerView.getScrollSt...
[ "boolean", "checkSelectForSwipe", "(", "int", "action", ",", "MotionEvent", "motionEvent", ",", "int", "pointerIndex", ")", "{", "if", "(", "mSelected", "!=", "null", "||", "action", "!=", "MotionEvent", ".", "ACTION_MOVE", "||", "mActionState", "==", "ACTION_ST...
Checks whether we should select a View for swiping.
[ "Checks", "whether", "we", "should", "select", "a", "View", "for", "swiping", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/recycler/ItemTouchHelper.java#L895-L946
49,466
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.inflateLayers
private void inflateLayers(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException { final LayerState state = mLayerState; final int innerDepth = parser.getDepth() + 1; int type; int depth; while ((type...
java
private void inflateLayers(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException { final LayerState state = mLayerState; final int innerDepth = parser.getDepth() + 1; int type; int depth; while ((type...
[ "private", "void", "inflateLayers", "(", "Resources", "r", ",", "XmlPullParser", "parser", ",", "AttributeSet", "attrs", ",", "Resources", ".", "Theme", "theme", ")", "throws", "XmlPullParserException", ",", "IOException", "{", "final", "LayerState", "state", "=",...
Inflates child layers using the specified parser.
[ "Inflates", "child", "layers", "using", "the", "specified", "parser", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L196-L241
49,467
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.addLayer
int addLayer(ChildDrawable layer) { final LayerState st = mLayerState; final int N = st.mChildren != null ? st.mChildren.length : 0; final int i = st.mNum; if (i >= N) { final ChildDrawable[] nu = new ChildDrawable[N + 10]; if (i > 0) { System.arra...
java
int addLayer(ChildDrawable layer) { final LayerState st = mLayerState; final int N = st.mChildren != null ? st.mChildren.length : 0; final int i = st.mNum; if (i >= N) { final ChildDrawable[] nu = new ChildDrawable[N + 10]; if (i > 0) { System.arra...
[ "int", "addLayer", "(", "ChildDrawable", "layer", ")", "{", "final", "LayerState", "st", "=", "mLayerState", ";", "final", "int", "N", "=", "st", ".", "mChildren", "!=", "null", "?", "st", ".", "mChildren", ".", "length", ":", "0", ";", "final", "int",...
Adds a new layer at the end of list of layers and returns its index. @param layer The layer to add. @return The index of the layer.
[ "Adds", "a", "new", "layer", "at", "the", "end", "of", "list", "of", "layers", "and", "returns", "its", "index", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L346-L363
49,468
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.addLayer
ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, int left, int top, int right, int bottom) { final ChildDrawable childDrawable = createLayer(dr); childDrawable.mId = id; childDrawable.mThemeAttrs = themeAttrs; if (Build.VERSION.SDK_INT >= Build.VER...
java
ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, int left, int top, int right, int bottom) { final ChildDrawable childDrawable = createLayer(dr); childDrawable.mId = id; childDrawable.mThemeAttrs = themeAttrs; if (Build.VERSION.SDK_INT >= Build.VER...
[ "ChildDrawable", "addLayer", "(", "Drawable", "dr", ",", "int", "[", "]", "themeAttrs", ",", "int", "id", ",", "int", "left", ",", "int", "top", ",", "int", "right", ",", "int", "bottom", ")", "{", "final", "ChildDrawable", "childDrawable", "=", "createL...
Add a new layer to this drawable. The new layer is identified by an id. @param dr The drawable to add as a layer. @param themeAttrs Theme attributes extracted from the layer. @param id The id of the new layer. @param left The left padding of the new layer. @param top The top padding of the...
[ "Add", "a", "new", "layer", "to", "this", "drawable", ".", "The", "new", "layer", "is", "identified", "by", "an", "id", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L376-L394
49,469
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.getId
public int getId(int index) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } return mLayerState.mChildren[index].mId; }
java
public int getId(int index) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } return mLayerState.mChildren[index].mId; }
[ "public", "int", "getId", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "mLayerState", ".", "mNum", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "return", "mLayerState", ".", "mChildren", "[", "index", "]", ".", ...
Returns the ID of the specified layer. @param index The index of the layer, must be in the range {@code 0...getNumberOfLayers()-1}. @return The id of the layer or {@link android.view.View#NO_ID} if the layer has no id. @attr ref android.R.styleable#LayerDrawableItem_id @see #setId(int, int)
[ "Returns", "the", "ID", "of", "the", "specified", "layer", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L459-L464
49,470
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.setDrawable
public void setDrawable(int index, Drawable drawable) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } final ChildDrawable[] layers = mLayerState.mChildren; final ChildDrawable childDrawable = layers[index]; if (childDrawable.mDrawable != n...
java
public void setDrawable(int index, Drawable drawable) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } final ChildDrawable[] layers = mLayerState.mChildren; final ChildDrawable childDrawable = layers[index]; if (childDrawable.mDrawable != n...
[ "public", "void", "setDrawable", "(", "int", "index", ",", "Drawable", "drawable", ")", "{", "if", "(", "index", ">=", "mLayerState", ".", "mNum", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "final", "ChildDrawable", "[", "]"...
Sets the drawable for the layer at the specified index. @param index The index of the layer to modify, must be in the range {@code 0...getNumberOfLayers()-1}. @param drawable The drawable to set for the layer. @attr ref android.R.styleable#LayerDrawableItem_drawable @see #getDrawable(int)
[ "Sets", "the", "drawable", "for", "the", "layer", "at", "the", "specified", "index", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L523-L547
49,471
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.getDrawable
public Drawable getDrawable(int index) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } return mLayerState.mChildren[index].mDrawable; }
java
public Drawable getDrawable(int index) { if (index >= mLayerState.mNum) { throw new IndexOutOfBoundsException(); } return mLayerState.mChildren[index].mDrawable; }
[ "public", "Drawable", "getDrawable", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "mLayerState", ".", "mNum", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "return", "mLayerState", ".", "mChildren", "[", "index", "]...
Returns the drawable for the layer at the specified index. @param index The index of the layer, must be in the range {@code 0...getNumberOfLayers()-1}. @return The {@link Drawable} at the specified layer index. @attr ref android.R.styleable#LayerDrawableItem_drawable @see #setDrawable(int, Drawable)
[ "Returns", "the", "drawable", "for", "the", "layer", "at", "the", "specified", "index", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L557-L562
49,472
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.setLayerInset
public void setLayerInset(int index, int l, int t, int r, int b) { setLayerInsetInternal(index, l, t, r, b, UNDEFINED_INSET, UNDEFINED_INSET); }
java
public void setLayerInset(int index, int l, int t, int r, int b) { setLayerInsetInternal(index, l, t, r, b, UNDEFINED_INSET, UNDEFINED_INSET); }
[ "public", "void", "setLayerInset", "(", "int", "index", ",", "int", "l", ",", "int", "t", ",", "int", "r", ",", "int", "b", ")", "{", "setLayerInsetInternal", "(", "index", ",", "l", ",", "t", ",", "r", ",", "b", ",", "UNDEFINED_INSET", ",", "UNDEF...
Specifies the insets in pixels for the drawable at the specified index. @param index the index of the drawable to adjust @param l number of pixels to add to the left bound @param t number of pixels to add to the top bound @param r number of pixels to subtract from the right bound @param b number of pix...
[ "Specifies", "the", "insets", "in", "pixels", "for", "the", "drawable", "at", "the", "specified", "index", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L671-L673
49,473
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.setLayerInsetRelative
public void setLayerInsetRelative(int index, int s, int t, int e, int b) { setLayerInsetInternal(index, 0, t, 0, b, s, e); }
java
public void setLayerInsetRelative(int index, int s, int t, int e, int b) { setLayerInsetInternal(index, 0, t, 0, b, s, e); }
[ "public", "void", "setLayerInsetRelative", "(", "int", "index", ",", "int", "s", ",", "int", "t", ",", "int", "e", ",", "int", "b", ")", "{", "setLayerInsetInternal", "(", "index", ",", "0", ",", "t", ",", "0", ",", "b", ",", "s", ",", "e", ")", ...
Specifies the relative insets in pixels for the drawable at the specified index. @param index the index of the layer to adjust @param s number of pixels to inset from the start bound @param t number of pixels to inset from the top bound @param e number of pixels to inset from the end bound @param b num...
[ "Specifies", "the", "relative", "insets", "in", "pixels", "for", "the", "drawable", "at", "the", "specified", "index", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L688-L690
49,474
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.refreshChildPadding
private boolean refreshChildPadding(int i, ChildDrawable r) { if (r.mDrawable != null) { final Rect rect = mTmpRect; r.mDrawable.getPadding(rect); if (rect.left != mPaddingL[i] || rect.top != mPaddingT[i] || rect.right != mPaddingR[i] || rect.bottom != mPa...
java
private boolean refreshChildPadding(int i, ChildDrawable r) { if (r.mDrawable != null) { final Rect rect = mTmpRect; r.mDrawable.getPadding(rect); if (rect.left != mPaddingL[i] || rect.top != mPaddingT[i] || rect.right != mPaddingR[i] || rect.bottom != mPa...
[ "private", "boolean", "refreshChildPadding", "(", "int", "i", ",", "ChildDrawable", "r", ")", "{", "if", "(", "r", ".", "mDrawable", "!=", "null", ")", "{", "final", "Rect", "rect", "=", "mTmpRect", ";", "r", ".", "mDrawable", ".", "getPadding", "(", "...
Refreshes the cached padding values for the specified child. @return true if the child's padding has changed
[ "Refreshes", "the", "cached", "padding", "values", "for", "the", "specified", "child", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L1551-L1565
49,475
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java
LayerDrawable.ensurePadding
void ensurePadding() { final int N = mLayerState.mNum; if (mPaddingL != null && mPaddingL.length >= N) { return; } mPaddingL = new int[N]; mPaddingT = new int[N]; mPaddingR = new int[N]; mPaddingB = new int[N]; }
java
void ensurePadding() { final int N = mLayerState.mNum; if (mPaddingL != null && mPaddingL.length >= N) { return; } mPaddingL = new int[N]; mPaddingT = new int[N]; mPaddingR = new int[N]; mPaddingB = new int[N]; }
[ "void", "ensurePadding", "(", ")", "{", "final", "int", "N", "=", "mLayerState", ".", "mNum", ";", "if", "(", "mPaddingL", "!=", "null", "&&", "mPaddingL", ".", "length", ">=", "N", ")", "{", "return", ";", "}", "mPaddingL", "=", "new", "int", "[", ...
Ensures the child padding caches are large enough.
[ "Ensures", "the", "child", "padding", "caches", "are", "large", "enough", "." ]
78b0a432bd49edc7a6a13ce111cab274085d1693
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LayerDrawable.java#L1570-L1580
49,476
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java
ResourceUtils.getResourceAsProperties
public static Properties getResourceAsProperties(ClassLoader loader, String resource) throws IOException { Properties props = new Properties(); InputStream in = null; String propfile = resource; in = getResourceAsStream(loader, propfile); props.load(in); in.close(); ...
java
public static Properties getResourceAsProperties(ClassLoader loader, String resource) throws IOException { Properties props = new Properties(); InputStream in = null; String propfile = resource; in = getResourceAsStream(loader, propfile); props.load(in); in.close(); ...
[ "public", "static", "Properties", "getResourceAsProperties", "(", "ClassLoader", "loader", ",", "String", "resource", ")", "throws", "IOException", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "InputStream", "in", "=", "null", ";", "Strin...
Returns a resource on the classpath as a Properties object @param loader The classloader used to load the resource @param resource The resource to find @throws IOException If the resource cannot be found or read @return The resource
[ "Returns", "a", "resource", "on", "the", "classpath", "as", "a", "Properties", "object" ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java#L175-L183
49,477
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java
ResourceUtils.getResourceAsReader
public static Reader getResourceAsReader(ClassLoader loader, String resource) throws IOException { return new InputStreamReader(getResourceAsStream(loader, resource)); }
java
public static Reader getResourceAsReader(ClassLoader loader, String resource) throws IOException { return new InputStreamReader(getResourceAsStream(loader, resource)); }
[ "public", "static", "Reader", "getResourceAsReader", "(", "ClassLoader", "loader", ",", "String", "resource", ")", "throws", "IOException", "{", "return", "new", "InputStreamReader", "(", "getResourceAsStream", "(", "loader", ",", "resource", ")", ")", ";", "}" ]
Returns a resource on the classpath as a Reader object @param loader The classloader used to load the resource @param resource The resource to find @throws IOException If the resource cannot be found or read @return The resource
[ "Returns", "a", "resource", "on", "the", "classpath", "as", "a", "Reader", "object" ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java#L213-L215
49,478
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java
ResourceUtils.getResourceAsFile
public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException { return new File(getResourceURL(loader, resource).getFile()); }
java
public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException { return new File(getResourceURL(loader, resource).getFile()); }
[ "public", "static", "File", "getResourceAsFile", "(", "ClassLoader", "loader", ",", "String", "resource", ")", "throws", "IOException", "{", "return", "new", "File", "(", "getResourceURL", "(", "loader", ",", "resource", ")", ".", "getFile", "(", ")", ")", "...
Returns a resource on the classpath as a File object @param loader The classloader used to load the resource @param resource The resource to find @throws IOException If the resource cannot be found or read @return The resource
[ "Returns", "a", "resource", "on", "the", "classpath", "as", "a", "File", "object" ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java#L245-L247
49,479
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/IdGenerator.java
IdGenerator.generateId
public synchronized String generateId() { final StringBuilder sb = new StringBuilder(this.length); sb.append(this.seed); sb.append(this.sequence.getAndIncrement()); return sb.toString(); }
java
public synchronized String generateId() { final StringBuilder sb = new StringBuilder(this.length); sb.append(this.seed); sb.append(this.sequence.getAndIncrement()); return sb.toString(); }
[ "public", "synchronized", "String", "generateId", "(", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "this", ".", "length", ")", ";", "sb", ".", "append", "(", "this", ".", "seed", ")", ";", "sb", ".", "append", "(", "this...
Generate a unqiue id @return a unique id
[ "Generate", "a", "unqiue", "id" ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/IdGenerator.java#L57-L62
49,480
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/IdGenerator.java
IdGenerator.generateSanitizedId
public String generateSanitizedId() { String result = this.generateId(); result = result.replace(':', '-'); result = result.replace('_', '-'); result = result.replace('.', '-'); return result; }
java
public String generateSanitizedId() { String result = this.generateId(); result = result.replace(':', '-'); result = result.replace('_', '-'); result = result.replace('.', '-'); return result; }
[ "public", "String", "generateSanitizedId", "(", ")", "{", "String", "result", "=", "this", ".", "generateId", "(", ")", ";", "result", "=", "result", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "result", "=", "result", ".", "replace", "("...
Generate a unique ID - that is friendly for a URL or file system @return a unique id
[ "Generate", "a", "unique", "ID", "-", "that", "is", "friendly", "for", "a", "URL", "or", "file", "system" ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/IdGenerator.java#L70-L76
49,481
killme2008/Metamorphosis
metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java
MetamorphosisOnJettyProcessor.doResponseHeaders
protected void doResponseHeaders(final HttpServletResponse response, final String mimeType) { if (mimeType != null) { response.setContentType(mimeType); } }
java
protected void doResponseHeaders(final HttpServletResponse response, final String mimeType) { if (mimeType != null) { response.setContentType(mimeType); } }
[ "protected", "void", "doResponseHeaders", "(", "final", "HttpServletResponse", "response", ",", "final", "String", "mimeType", ")", "{", "if", "(", "mimeType", "!=", "null", ")", "{", "response", ".", "setContentType", "(", "mimeType", ")", ";", "}", "}" ]
Set the response headers. This method is called to set the response headers such as content type and content length. May be extended to add additional headers. @param response @param resource @param mimeType
[ "Set", "the", "response", "headers", ".", "This", "method", "is", "called", "to", "set", "the", "response", "headers", "such", "as", "content", "type", "and", "content", "length", ".", "May", "be", "extended", "to", "add", "additional", "headers", "." ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java#L204-L208
49,482
killme2008/Metamorphosis
metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java
MetaqTemplate.getOrCreateProducer
public MessageProducer getOrCreateProducer(final String topic) { if (!this.shareProducer) { FutureTask<MessageProducer> task = this.producers.get(topic); if (task == null) { task = new FutureTask<MessageProducer>(new Callable<MessageProducer>() { @Ove...
java
public MessageProducer getOrCreateProducer(final String topic) { if (!this.shareProducer) { FutureTask<MessageProducer> task = this.producers.get(topic); if (task == null) { task = new FutureTask<MessageProducer>(new Callable<MessageProducer>() { @Ove...
[ "public", "MessageProducer", "getOrCreateProducer", "(", "final", "String", "topic", ")", "{", "if", "(", "!", "this", ".", "shareProducer", ")", "{", "FutureTask", "<", "MessageProducer", ">", "task", "=", "this", ".", "producers", ".", "get", "(", "topic",...
Returns or create a message producer for topic. @param topic @return @since 1.4.5
[ "Returns", "or", "create", "a", "message", "producer", "for", "topic", "." ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java#L145-L197
49,483
killme2008/Metamorphosis
metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java
MetaqTemplate.send
public SendResult send(MessageBuilder builder, long timeout, TimeUnit unit) throws InterruptedException { Message msg = builder.build(this.messageBodyConverter); final String topic = msg.getTopic(); MessageProducer producer = this.getOrCreateProducer(topic); try { return prod...
java
public SendResult send(MessageBuilder builder, long timeout, TimeUnit unit) throws InterruptedException { Message msg = builder.build(this.messageBodyConverter); final String topic = msg.getTopic(); MessageProducer producer = this.getOrCreateProducer(topic); try { return prod...
[ "public", "SendResult", "send", "(", "MessageBuilder", "builder", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "Message", "msg", "=", "builder", ".", "build", "(", "this", ".", "messageBodyConverter", ")", ";", "...
Send message built by message builder.Returns the sent result. @param builder @return @throws InterruptedException @since 1.4.5
[ "Send", "message", "built", "by", "message", "builder", ".", "Returns", "the", "sent", "result", "." ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java#L208-L218
49,484
killme2008/Metamorphosis
metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java
MetaqTemplate.send
public void send(MessageBuilder builder, SendMessageCallback cb, long timeout, TimeUnit unit) { Message msg = builder.build(this.messageBodyConverter); final String topic = msg.getTopic(); MessageProducer producer = this.getOrCreateProducer(topic); producer.sendMessage(msg, cb, timeout, ...
java
public void send(MessageBuilder builder, SendMessageCallback cb, long timeout, TimeUnit unit) { Message msg = builder.build(this.messageBodyConverter); final String topic = msg.getTopic(); MessageProducer producer = this.getOrCreateProducer(topic); producer.sendMessage(msg, cb, timeout, ...
[ "public", "void", "send", "(", "MessageBuilder", "builder", ",", "SendMessageCallback", "cb", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "Message", "msg", "=", "builder", ".", "build", "(", "this", ".", "messageBodyConverter", ")", ";", "fina...
Send message asynchronously with callback. @param builder @param cb @param timeout @param unit @since 1.4.5
[ "Send", "message", "asynchronously", "with", "callback", "." ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MetaqTemplate.java#L251-L256
49,485
killme2008/Metamorphosis
metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MessageBuilder.java
MessageBuilder.build
public <T> Message build(MessageBodyConverter<T> converter) { if (StringUtils.isBlank(this.topic)) { throw new IllegalArgumentException("Blank topic"); } if (this.body == null && this.payload == null) { throw new IllegalArgumentException("Empty payload"); } ...
java
public <T> Message build(MessageBodyConverter<T> converter) { if (StringUtils.isBlank(this.topic)) { throw new IllegalArgumentException("Blank topic"); } if (this.body == null && this.payload == null) { throw new IllegalArgumentException("Empty payload"); } ...
[ "public", "<", "T", ">", "Message", "build", "(", "MessageBodyConverter", "<", "T", ">", "converter", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "this", ".", "topic", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Blank to...
Build message by message body converter. @param converter @return @since 1.4.5
[ "Build", "message", "by", "message", "body", "converter", "." ]
1884b10620dbd640aaf85102243ca295703fbb4a
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-client/src/main/java/com/taobao/metamorphosis/client/extension/spring/MessageBuilder.java#L103-L124
49,486
mongobee/mongobee
src/main/java/com/github/mongobee/dao/ChangeEntryDao.java
ChangeEntryDao.acquireProcessLock
public boolean acquireProcessLock() throws MongobeeConnectionException, MongobeeLockException { verifyDbConnection(); boolean acquired = lockDao.acquireLock(getMongoDatabase()); if (!acquired && waitForLock) { long timeToGiveUp = new Date().getTime() + (changeLogLockWaitTime * 1000 * 60); while...
java
public boolean acquireProcessLock() throws MongobeeConnectionException, MongobeeLockException { verifyDbConnection(); boolean acquired = lockDao.acquireLock(getMongoDatabase()); if (!acquired && waitForLock) { long timeToGiveUp = new Date().getTime() + (changeLogLockWaitTime * 1000 * 60); while...
[ "public", "boolean", "acquireProcessLock", "(", ")", "throws", "MongobeeConnectionException", ",", "MongobeeLockException", "{", "verifyDbConnection", "(", ")", ";", "boolean", "acquired", "=", "lockDao", ".", "acquireLock", "(", "getMongoDatabase", "(", ")", ")", "...
Try to acquire process lock @return true if successfully acquired, false otherwise @throws MongobeeConnectionException exception @throws MongobeeLockException exception
[ "Try", "to", "acquire", "process", "lock" ]
4e1ec5e381121fc9e5ad54881c84029114bafa52
https://github.com/mongobee/mongobee/blob/4e1ec5e381121fc9e5ad54881c84029114bafa52/src/main/java/com/github/mongobee/dao/ChangeEntryDao.java#L94-L119
49,487
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.waitForCompletion
public boolean waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException { synchronized (lock) { if (!isCompleted()) { lock.wait(timeUnit.toMillis(duration)); } return isCompleted(); } }
java
public boolean waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException { synchronized (lock) { if (!isCompleted()) { lock.wait(timeUnit.toMillis(duration)); } return isCompleted(); } }
[ "public", "boolean", "waitForCompletion", "(", "long", "duration", ",", "TimeUnit", "timeUnit", ")", "throws", "InterruptedException", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "!", "isCompleted", "(", ")", ")", "{", "lock", ".", "wait", "(", ...
Blocks until the task is complete or times out. @return {@code true} if the task completed (has a result, an error, or was cancelled). {@code false} otherwise.
[ "Blocks", "until", "the", "task", "is", "complete", "or", "times", "out", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L189-L196
49,488
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.forResult
@SuppressWarnings("unchecked") public static <TResult> Task<TResult> forResult(TResult value) { if (value == null) { return (Task<TResult>) TASK_NULL; } if (value instanceof Boolean) { return (Task<TResult>) ((Boolean) value ? TASK_TRUE : TASK_FALSE); } bolts.TaskCompletionSource<TResu...
java
@SuppressWarnings("unchecked") public static <TResult> Task<TResult> forResult(TResult value) { if (value == null) { return (Task<TResult>) TASK_NULL; } if (value instanceof Boolean) { return (Task<TResult>) ((Boolean) value ? TASK_TRUE : TASK_FALSE); } bolts.TaskCompletionSource<TResu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "TResult", ">", "Task", "<", "TResult", ">", "forResult", "(", "TResult", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "(", "Task", "<", "TResult", ...
Creates a completed task with the given value.
[ "Creates", "a", "completed", "task", "with", "the", "given", "value", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L201-L212
49,489
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.forError
public static <TResult> Task<TResult> forError(Exception error) { bolts.TaskCompletionSource<TResult> tcs = new bolts.TaskCompletionSource<>(); tcs.setError(error); return tcs.getTask(); }
java
public static <TResult> Task<TResult> forError(Exception error) { bolts.TaskCompletionSource<TResult> tcs = new bolts.TaskCompletionSource<>(); tcs.setError(error); return tcs.getTask(); }
[ "public", "static", "<", "TResult", ">", "Task", "<", "TResult", ">", "forError", "(", "Exception", "error", ")", "{", "bolts", ".", "TaskCompletionSource", "<", "TResult", ">", "tcs", "=", "new", "bolts", ".", "TaskCompletionSource", "<>", "(", ")", ";", ...
Creates a faulted task with the given error.
[ "Creates", "a", "faulted", "task", "with", "the", "given", "error", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L217-L221
49,490
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.delay
public static Task<Void> delay(long delay, CancellationToken cancellationToken) { return delay(delay, BoltsExecutors.scheduled(), cancellationToken); }
java
public static Task<Void> delay(long delay, CancellationToken cancellationToken) { return delay(delay, BoltsExecutors.scheduled(), cancellationToken); }
[ "public", "static", "Task", "<", "Void", ">", "delay", "(", "long", "delay", ",", "CancellationToken", "cancellationToken", ")", "{", "return", "delay", "(", "delay", ",", "BoltsExecutors", ".", "scheduled", "(", ")", ",", "cancellationToken", ")", ";", "}" ...
Creates a task that completes after a time delay. @param delay The number of milliseconds to wait before completing the returned task. Zero and negative values are treated as requests for immediate execution. @param cancellationToken The optional cancellation token that will be checked prior to completing the returned...
[ "Creates", "a", "task", "that", "completes", "after", "a", "time", "delay", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L249-L251
49,491
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.cast
public <TOut> Task<TOut> cast() { @SuppressWarnings("unchecked") Task<TOut> task = (Task<TOut>) this; return task; }
java
public <TOut> Task<TOut> cast() { @SuppressWarnings("unchecked") Task<TOut> task = (Task<TOut>) this; return task; }
[ "public", "<", "TOut", ">", "Task", "<", "TOut", ">", "cast", "(", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Task", "<", "TOut", ">", "task", "=", "(", "Task", "<", "TOut", ">", ")", "this", ";", "return", "task", ";", "}" ]
Makes a fluent cast of a Task's result possible, avoiding an extra continuation just to cast the type of the result.
[ "Makes", "a", "fluent", "cast", "of", "a", "Task", "s", "result", "possible", "avoiding", "an", "extra", "continuation", "just", "to", "cast", "the", "type", "of", "the", "result", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L287-L291
49,492
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.continueWith
public <TContinuationResult> Task<TContinuationResult> continueWith( Continuation<TResult, TContinuationResult> continuation) { return continueWith(continuation, IMMEDIATE_EXECUTOR, null); }
java
public <TContinuationResult> Task<TContinuationResult> continueWith( Continuation<TResult, TContinuationResult> continuation) { return continueWith(continuation, IMMEDIATE_EXECUTOR, null); }
[ "public", "<", "TContinuationResult", ">", "Task", "<", "TContinuationResult", ">", "continueWith", "(", "Continuation", "<", "TResult", ",", "TContinuationResult", ">", "continuation", ")", "{", "return", "continueWith", "(", "continuation", ",", "IMMEDIATE_EXECUTOR"...
Adds a synchronous continuation to this task, returning a new task that completes after the continuation has finished running.
[ "Adds", "a", "synchronous", "continuation", "to", "this", "task", "returning", "a", "new", "task", "that", "completes", "after", "the", "continuation", "has", "finished", "running", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L667-L670
49,493
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.continueWithTask
public <TContinuationResult> Task<TContinuationResult> continueWithTask( final Continuation<TResult, Task<TContinuationResult>> continuation, final Executor executor, final CancellationToken ct) { boolean completed; final bolts.TaskCompletionSource<TContinuationResult> tcs = new bolts.TaskCompletion...
java
public <TContinuationResult> Task<TContinuationResult> continueWithTask( final Continuation<TResult, Task<TContinuationResult>> continuation, final Executor executor, final CancellationToken ct) { boolean completed; final bolts.TaskCompletionSource<TContinuationResult> tcs = new bolts.TaskCompletion...
[ "public", "<", "TContinuationResult", ">", "Task", "<", "TContinuationResult", ">", "continueWithTask", "(", "final", "Continuation", "<", "TResult", ",", "Task", "<", "TContinuationResult", ">", ">", "continuation", ",", "final", "Executor", "executor", ",", "fin...
Adds an Task-based continuation to this task that will be scheduled using the executor, returning a new task that completes after the task returned by the continuation has completed.
[ "Adds", "an", "Task", "-", "based", "continuation", "to", "this", "task", "that", "will", "be", "scheduled", "using", "the", "executor", "returning", "a", "new", "task", "that", "completes", "after", "the", "task", "returned", "by", "the", "continuation", "h...
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L694-L715
49,494
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.continueWithTask
public <TContinuationResult> Task<TContinuationResult> continueWithTask( Continuation<TResult, Task<TContinuationResult>> continuation) { return continueWithTask(continuation, IMMEDIATE_EXECUTOR, null); }
java
public <TContinuationResult> Task<TContinuationResult> continueWithTask( Continuation<TResult, Task<TContinuationResult>> continuation) { return continueWithTask(continuation, IMMEDIATE_EXECUTOR, null); }
[ "public", "<", "TContinuationResult", ">", "Task", "<", "TContinuationResult", ">", "continueWithTask", "(", "Continuation", "<", "TResult", ",", "Task", "<", "TContinuationResult", ">", ">", "continuation", ")", "{", "return", "continueWithTask", "(", "continuation...
Adds an asynchronous continuation to this task, returning a new task that completes after the task returned by the continuation has completed.
[ "Adds", "an", "asynchronous", "continuation", "to", "this", "task", "returning", "a", "new", "task", "that", "completes", "after", "the", "task", "returned", "by", "the", "continuation", "has", "completed", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L721-L724
49,495
BoltsFramework/Bolts-Android
bolts-applinks/src/main/java/bolts/WebViewAppLinkResolver.java
WebViewAppLinkResolver.parseAlData
private static Map<String, Object> parseAlData(JSONArray dataArray) throws JSONException { HashMap<String, Object> al = new HashMap<String, Object>(); for (int i = 0; i < dataArray.length(); i++) { JSONObject tag = dataArray.getJSONObject(i); String name = tag.getString("property"); String[] n...
java
private static Map<String, Object> parseAlData(JSONArray dataArray) throws JSONException { HashMap<String, Object> al = new HashMap<String, Object>(); for (int i = 0; i < dataArray.length(); i++) { JSONObject tag = dataArray.getJSONObject(i); String name = tag.getString("property"); String[] n...
[ "private", "static", "Map", "<", "String", ",", "Object", ">", "parseAlData", "(", "JSONArray", "dataArray", ")", "throws", "JSONException", "{", "HashMap", "<", "String", ",", "Object", ">", "al", "=", "new", "HashMap", "<", "String", ",", "Object", ">", ...
Builds up a data structure filled with the app link data from the meta tags on a page. The structure of this object is a dictionary where each key holds an array of app link data dictionaries. Values are stored in a key called "_value".
[ "Builds", "up", "a", "data", "structure", "filled", "with", "the", "app", "link", "data", "from", "the", "meta", "tags", "on", "a", "page", ".", "The", "structure", "of", "this", "object", "is", "a", "dictionary", "where", "each", "key", "holds", "an", ...
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-applinks/src/main/java/bolts/WebViewAppLinkResolver.java#L190-L224
49,496
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/CancellationTokenSource.java
CancellationTokenSource.cancel
public void cancel() { List<CancellationTokenRegistration> registrations; synchronized (lock) { throwIfClosed(); if (cancellationRequested) { return; } cancelScheduledCancellation(); cancellationRequested = true; registrations = new ArrayList<>(this.registrations); ...
java
public void cancel() { List<CancellationTokenRegistration> registrations; synchronized (lock) { throwIfClosed(); if (cancellationRequested) { return; } cancelScheduledCancellation(); cancellationRequested = true; registrations = new ArrayList<>(this.registrations); ...
[ "public", "void", "cancel", "(", ")", "{", "List", "<", "CancellationTokenRegistration", ">", "registrations", ";", "synchronized", "(", "lock", ")", "{", "throwIfClosed", "(", ")", ";", "if", "(", "cancellationRequested", ")", "{", "return", ";", "}", "canc...
Cancels the token if it has not already been cancelled.
[ "Cancels", "the", "token", "if", "it", "has", "not", "already", "been", "cancelled", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/CancellationTokenSource.java#L64-L78
49,497
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/CancellationTokenRegistration.java
CancellationTokenRegistration.close
@Override public void close() { synchronized (lock) { if (closed) { return; } closed = true; tokenSource.unregister(this); tokenSource = null; action = null; } }
java
@Override public void close() { synchronized (lock) { if (closed) { return; } closed = true; tokenSource.unregister(this); tokenSource = null; action = null; } }
[ "@", "Override", "public", "void", "close", "(", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "closed", ")", "{", "return", ";", "}", "closed", "=", "true", ";", "tokenSource", ".", "unregister", "(", "this", ")", ";", "tokenSource", "...
Unregisters the callback runnable from the cancellation token.
[ "Unregisters", "the", "callback", "runnable", "from", "the", "cancellation", "token", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/CancellationTokenRegistration.java#L31-L43
49,498
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/AndroidExecutors.java
AndroidExecutors.newCachedThreadPool
public static ExecutorService newCachedThreadPool() { ThreadPoolExecutor executor = new ThreadPoolExecutor( CORE_POOL_SIZE, MAX_POOL_SIZE, KEEP_ALIVE_TIME, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); allowCoreThreadTimeout(executor, true); return executor; }
java
public static ExecutorService newCachedThreadPool() { ThreadPoolExecutor executor = new ThreadPoolExecutor( CORE_POOL_SIZE, MAX_POOL_SIZE, KEEP_ALIVE_TIME, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); allowCoreThreadTimeout(executor, true); return executor; }
[ "public", "static", "ExecutorService", "newCachedThreadPool", "(", ")", "{", "ThreadPoolExecutor", "executor", "=", "new", "ThreadPoolExecutor", "(", "CORE_POOL_SIZE", ",", "MAX_POOL_SIZE", ",", "KEEP_ALIVE_TIME", ",", "TimeUnit", ".", "SECONDS", ",", "new", "LinkedBl...
Creates a proper Cached Thread Pool. Tasks will reuse cached threads if available or create new threads until the core pool is full. tasks will then be queued. If an task cannot be queued, a new thread will be created unless this would exceed max pool size, then the task will be rejected. Threads will time out after 1 ...
[ "Creates", "a", "proper", "Cached", "Thread", "Pool", ".", "Tasks", "will", "reuse", "cached", "threads", "if", "available", "or", "create", "new", "threads", "until", "the", "core", "pool", "is", "full", ".", "tasks", "will", "then", "be", "queued", ".", ...
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/AndroidExecutors.java#L70-L80
49,499
BoltsFramework/Bolts-Android
bolts-applinks/src/main/java/bolts/AppLinks.java
AppLinks.getAppLinkExtras
public static Bundle getAppLinkExtras(Intent intent) { Bundle appLinkData = getAppLinkData(intent); if (appLinkData == null) { return null; } return appLinkData.getBundle(KEY_NAME_EXTRAS); }
java
public static Bundle getAppLinkExtras(Intent intent) { Bundle appLinkData = getAppLinkData(intent); if (appLinkData == null) { return null; } return appLinkData.getBundle(KEY_NAME_EXTRAS); }
[ "public", "static", "Bundle", "getAppLinkExtras", "(", "Intent", "intent", ")", "{", "Bundle", "appLinkData", "=", "getAppLinkData", "(", "intent", ")", ";", "if", "(", "appLinkData", "==", "null", ")", "{", "return", "null", ";", "}", "return", "appLinkData...
Gets the App Link extras for an intent, if there is any. @param intent the incoming intent. @return a bundle containing the App Link extras for the intent, or {@code null} if none is specified.
[ "Gets", "the", "App", "Link", "extras", "for", "an", "intent", "if", "there", "is", "any", "." ]
54e9cb8bdd4950aa4d418dcbc0ea65414762aef5
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-applinks/src/main/java/bolts/AppLinks.java#L43-L49