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
115,200
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VEvent.java
VEvent.getConsumedTime
public final PeriodList getConsumedTime(final Date rangeStart, final Date rangeEnd, final boolean normalise) { PeriodList periods = new PeriodList(); // if component is transparent return empty list.. if (!Transp.TRANSPARENT.equals(getProperty(Property.TRANSP))) { // try { ...
java
public final PeriodList getConsumedTime(final Date rangeStart, final Date rangeEnd, final boolean normalise) { PeriodList periods = new PeriodList(); // if component is transparent return empty list.. if (!Transp.TRANSPARENT.equals(getProperty(Property.TRANSP))) { // try { ...
[ "public", "final", "PeriodList", "getConsumedTime", "(", "final", "Date", "rangeStart", ",", "final", "Date", "rangeEnd", ",", "final", "boolean", "normalise", ")", "{", "PeriodList", "periods", "=", "new", "PeriodList", "(", ")", ";", "// if component is transpar...
Returns a list of periods representing the consumed time for this event in the specified range. Note that the returned list may contain a single period for non-recurring components or multiple periods for recurring components. If no time is consumed by this event an empty list is returned. @param rangeStart the start o...
[ "Returns", "a", "list", "of", "periods", "representing", "the", "consumed", "time", "for", "this", "event", "in", "the", "specified", "range", ".", "Note", "that", "the", "returned", "list", "may", "contain", "a", "single", "period", "for", "non", "-", "re...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VEvent.java#L450-L473
115,201
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VEvent.java
VEvent.getOccurrence
public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurr...
java
public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurr...
[ "public", "final", "VEvent", "getOccurrence", "(", "final", "Date", "date", ")", "throws", "IOException", ",", "URISyntaxException", ",", "ParseException", "{", "final", "PeriodList", "consumedTime", "=", "getConsumedTime", "(", "date", ",", "date", ")", ";", "f...
Returns a single occurrence of a recurring event. @param date a date on which the occurence should occur @return a single non-recurring event instance for the specified date, or null if the event doesn't occur on the specified date @throws IOException where an error occurs reading data @throws URISyntaxException where ...
[ "Returns", "a", "single", "occurrence", "of", "a", "recurring", "event", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VEvent.java#L484-L496
115,202
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VEvent.java
VEvent.getEndDate
public final DtEnd getEndDate(final boolean deriveFromDuration) { DtEnd dtEnd = getProperty(Property.DTEND); // No DTEND? No problem, we'll use the DURATION. if (dtEnd == null && deriveFromDuration && getStartDate() != null) { final DtStart dtStart = getStartDate(); final...
java
public final DtEnd getEndDate(final boolean deriveFromDuration) { DtEnd dtEnd = getProperty(Property.DTEND); // No DTEND? No problem, we'll use the DURATION. if (dtEnd == null && deriveFromDuration && getStartDate() != null) { final DtStart dtStart = getStartDate(); final...
[ "public", "final", "DtEnd", "getEndDate", "(", "final", "boolean", "deriveFromDuration", ")", "{", "DtEnd", "dtEnd", "=", "getProperty", "(", "Property", ".", "DTEND", ")", ";", "// No DTEND? No problem, we'll use the DURATION.", "if", "(", "dtEnd", "==", "null", ...
Convenience method to pull the DTEND out of the property list. If DTEND was not specified, use the DTSTART + DURATION to calculate it. @param deriveFromDuration specifies whether to derive an end date from the event duration where an end date is not found @return The end for this VEVENT.
[ "Convenience", "method", "to", "pull", "the", "DTEND", "out", "of", "the", "property", "list", ".", "If", "DTEND", "was", "not", "specified", "use", "the", "DTSTART", "+", "DURATION", "to", "calculate", "it", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VEvent.java#L627-L652
115,203
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VEvent.java
VEvent.copy
public Component copy() throws ParseException, IOException, URISyntaxException { final VEvent copy = (VEvent) super.copy(); copy.alarms = new ComponentList<VAlarm>(alarms); return copy; }
java
public Component copy() throws ParseException, IOException, URISyntaxException { final VEvent copy = (VEvent) super.copy(); copy.alarms = new ComponentList<VAlarm>(alarms); return copy; }
[ "public", "Component", "copy", "(", ")", "throws", "ParseException", ",", "IOException", ",", "URISyntaxException", "{", "final", "VEvent", "copy", "=", "(", "VEvent", ")", "super", ".", "copy", "(", ")", ";", "copy", ".", "alarms", "=", "new", "ComponentL...
Overrides default copy method to add support for copying alarm sub-components. @return a copy of the instance @throws ParseException where values in the instance cannot be parsed @throws IOException where values in the instance cannot be read @throws URISyntaxException where an invalid URI value is encountered in the i...
[ "Overrides", "default", "copy", "method", "to", "add", "support", "for", "copying", "alarm", "sub", "-", "components", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VEvent.java#L696-L701
115,204
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Strings.java
Strings.unquote
public static String unquote(final String aValue) { if (aValue != null && aValue.startsWith("\"") && aValue.endsWith("\"")) { return aValue.substring(0, aValue.length() - 1).substring(1); } return aValue; }
java
public static String unquote(final String aValue) { if (aValue != null && aValue.startsWith("\"") && aValue.endsWith("\"")) { return aValue.substring(0, aValue.length() - 1).substring(1); } return aValue; }
[ "public", "static", "String", "unquote", "(", "final", "String", "aValue", ")", "{", "if", "(", "aValue", "!=", "null", "&&", "aValue", ".", "startsWith", "(", "\"\\\"\"", ")", "&&", "aValue", ".", "endsWith", "(", "\"\\\"\"", ")", ")", "{", "return", ...
Convenience method for removing surrounding quotes from a string value. @param aValue a string to remove quotes from @return an un-quoted string
[ "Convenience", "method", "for", "removing", "surrounding", "quotes", "from", "a", "string", "value", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Strings.java#L155-L160
115,205
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateRange.java
DateRange.includes
public final boolean includes(final Date date, final int inclusiveMask) { boolean includes; if ((inclusiveMask & INCLUSIVE_START) > 0) { includes = !rangeStart.after(date); } else { includes = rangeStart.before(date); } if ((inclusiveMask & INCLUSI...
java
public final boolean includes(final Date date, final int inclusiveMask) { boolean includes; if ((inclusiveMask & INCLUSIVE_START) > 0) { includes = !rangeStart.after(date); } else { includes = rangeStart.before(date); } if ((inclusiveMask & INCLUSI...
[ "public", "final", "boolean", "includes", "(", "final", "Date", "date", ",", "final", "int", "inclusiveMask", ")", "{", "boolean", "includes", ";", "if", "(", "(", "inclusiveMask", "&", "INCLUSIVE_START", ")", ">", "0", ")", "{", "includes", "=", "!", "r...
Decides whether a date falls within this period. @param date the date to be tested @param inclusiveMask specifies whether period start and end are included in the calculation @return true if the date is in the period, false otherwise @see Period#INCLUSIVE_START @see Period#INCLUSIVE_END
[ "Decides", "whether", "a", "date", "falls", "within", "this", "period", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateRange.java#L114-L129
115,206
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateRange.java
DateRange.intersects
public final boolean intersects(final DateRange range) { boolean intersects = false; // Test for our start date in period // (Exclude if it is the end date of test range) if (range.includes(rangeStart) && !range.getRangeEnd().equals(rangeStart)) { intersects = true; }...
java
public final boolean intersects(final DateRange range) { boolean intersects = false; // Test for our start date in period // (Exclude if it is the end date of test range) if (range.includes(rangeStart) && !range.getRangeEnd().equals(rangeStart)) { intersects = true; }...
[ "public", "final", "boolean", "intersects", "(", "final", "DateRange", "range", ")", "{", "boolean", "intersects", "=", "false", ";", "// Test for our start date in period", "// (Exclude if it is the end date of test range)", "if", "(", "range", ".", "includes", "(", "r...
Decides whether this period intersects with another one. @param range a possible intersecting period @return true if the specified period intersects this one, false otherwise.
[ "Decides", "whether", "this", "period", "intersects", "with", "another", "one", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateRange.java#L163-L177
115,207
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateRange.java
DateRange.adjacent
public final boolean adjacent(final DateRange range) { boolean adjacent = false; if (rangeStart.equals(range.getRangeEnd())) { adjacent = true; } else if (rangeEnd.equals(range.getRangeStart())) { adjacent = true; } return adjacent; }
java
public final boolean adjacent(final DateRange range) { boolean adjacent = false; if (rangeStart.equals(range.getRangeEnd())) { adjacent = true; } else if (rangeEnd.equals(range.getRangeStart())) { adjacent = true; } return adjacent; }
[ "public", "final", "boolean", "adjacent", "(", "final", "DateRange", "range", ")", "{", "boolean", "adjacent", "=", "false", ";", "if", "(", "rangeStart", ".", "equals", "(", "range", ".", "getRangeEnd", "(", ")", ")", ")", "{", "adjacent", "=", "true", ...
Decides whether these periods are serial without a gap. @param range a period to test for adjacency @return true if one period immediately follows the other, false otherwise
[ "Decides", "whether", "these", "periods", "are", "serial", "without", "a", "gap", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateRange.java#L184-L192
115,208
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/AbstractContentFactory.java
AbstractContentFactory.registerExtendedFactory
@Deprecated protected final void registerExtendedFactory(String key, T factory) { extendedFactories.put(key, factory); }
java
@Deprecated protected final void registerExtendedFactory(String key, T factory) { extendedFactories.put(key, factory); }
[ "@", "Deprecated", "protected", "final", "void", "registerExtendedFactory", "(", "String", "key", ",", "T", "factory", ")", "{", "extendedFactories", ".", "put", "(", "key", ",", "factory", ")", ";", "}" ]
Register a non-standard content factory. @deprecated Define extensions in META-INF/services/net.fortuna.ical4j.model.[Type]Factory
[ "Register", "a", "non", "-", "standard", "content", "factory", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/AbstractContentFactory.java#L69-L72
115,209
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/PropertyList.java
PropertyList.getProperty
public final <R> R getProperty(final String aName) { for (final T p : this) { if (p.getName().equalsIgnoreCase(aName)) { return (R) p; } } return null; }
java
public final <R> R getProperty(final String aName) { for (final T p : this) { if (p.getName().equalsIgnoreCase(aName)) { return (R) p; } } return null; }
[ "public", "final", "<", "R", ">", "R", "getProperty", "(", "final", "String", "aName", ")", "{", "for", "(", "final", "T", "p", ":", "this", ")", "{", "if", "(", "p", ".", "getName", "(", ")", ".", "equalsIgnoreCase", "(", "aName", ")", ")", "{",...
Returns the first property of specified name. @param aName name of property to return @return a property or null if no matching property found
[ "Returns", "the", "first", "property", "of", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/PropertyList.java#L93-L100
115,210
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/PropertyList.java
PropertyList.getProperties
@SuppressWarnings("unchecked") public final <C extends T> PropertyList<C> getProperties(final String name) { final PropertyList<C> list = new PropertyList<C>(); for (final T p : this) { if (p.getName().equalsIgnoreCase(name)) { list.add((C) p); } } ...
java
@SuppressWarnings("unchecked") public final <C extends T> PropertyList<C> getProperties(final String name) { final PropertyList<C> list = new PropertyList<C>(); for (final T p : this) { if (p.getName().equalsIgnoreCase(name)) { list.add((C) p); } } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "<", "C", "extends", "T", ">", "PropertyList", "<", "C", ">", "getProperties", "(", "final", "String", "name", ")", "{", "final", "PropertyList", "<", "C", ">", "list", "=", "new", "P...
Returns a list of properties with the specified name. @param name name of properties to return @return a property list
[ "Returns", "a", "list", "of", "properties", "with", "the", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/PropertyList.java#L107-L116
115,211
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Uris.java
Uris.encode
public static String encode(final String s) { /* * try { return URLEncoder.encode(s, ENCODING_CHARSET); } catch (UnsupportedEncodingException use) { * log.error("Error ocurred encoding URI [" + s + "]", use); } */ /* * Lotus Notes does not correctly strip angle brack...
java
public static String encode(final String s) { /* * try { return URLEncoder.encode(s, ENCODING_CHARSET); } catch (UnsupportedEncodingException use) { * log.error("Error ocurred encoding URI [" + s + "]", use); } */ /* * Lotus Notes does not correctly strip angle brack...
[ "public", "static", "String", "encode", "(", "final", "String", "s", ")", "{", "/*\n * try { return URLEncoder.encode(s, ENCODING_CHARSET); } catch (UnsupportedEncodingException use) {\n * log.error(\"Error ocurred encoding URI [\" + s + \"]\", use); }\n */", "/*\n ...
Encodes the specified URI string using the UTF-8 charset. In the event that an exception is thrown, the specifed URI string is returned unmodified. @param s a URI string @return an encoded URI string
[ "Encodes", "the", "specified", "URI", "string", "using", "the", "UTF", "-", "8", "charset", ".", "In", "the", "event", "that", "an", "exception", "is", "thrown", "the", "specifed", "URI", "string", "is", "returned", "unmodified", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Uris.java#L68-L88
115,212
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/IndexedPropertyList.java
IndexedPropertyList.getProperties
public PropertyList<Property> getProperties(final String paramValue) { PropertyList<Property> properties = index.get(paramValue); if (properties == null) { properties = EMPTY_LIST; } return properties; }
java
public PropertyList<Property> getProperties(final String paramValue) { PropertyList<Property> properties = index.get(paramValue); if (properties == null) { properties = EMPTY_LIST; } return properties; }
[ "public", "PropertyList", "<", "Property", ">", "getProperties", "(", "final", "String", "paramValue", ")", "{", "PropertyList", "<", "Property", ">", "properties", "=", "index", ".", "get", "(", "paramValue", ")", ";", "if", "(", "properties", "==", "null",...
Returns a list of properties containing a parameter with the specified value. @param paramValue the value of the parameter contained in the returned properties @return a property list
[ "Returns", "a", "list", "of", "properties", "containing", "a", "parameter", "with", "the", "specified", "value", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/IndexedPropertyList.java#L77-L83
115,213
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/IndexedPropertyList.java
IndexedPropertyList.getProperty
public Property getProperty(final String paramValue) { final PropertyList<Property> properties = getProperties(paramValue); if (!properties.isEmpty()) { return properties.iterator().next(); } return null; }
java
public Property getProperty(final String paramValue) { final PropertyList<Property> properties = getProperties(paramValue); if (!properties.isEmpty()) { return properties.iterator().next(); } return null; }
[ "public", "Property", "getProperty", "(", "final", "String", "paramValue", ")", "{", "final", "PropertyList", "<", "Property", ">", "properties", "=", "getProperties", "(", "paramValue", ")", ";", "if", "(", "!", "properties", ".", "isEmpty", "(", ")", ")", ...
Returns the first property containing a parameter with the specified value. @param paramValue the value of the parameter identified in the returned property @return a property or null if no property is found containing a parameter with the specified value
[ "Returns", "the", "first", "property", "containing", "a", "parameter", "with", "the", "specified", "value", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/IndexedPropertyList.java#L93-L99
115,214
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/CalendarComponent.java
CalendarComponent.validate
public final void validate(Method method) throws ValidationException { final Validator<CalendarComponent> validator = getValidator(method); if (validator != null) { validator.validate(this); } else { throw new ValidationException("Unsupported method: " + method); ...
java
public final void validate(Method method) throws ValidationException { final Validator<CalendarComponent> validator = getValidator(method); if (validator != null) { validator.validate(this); } else { throw new ValidationException("Unsupported method: " + method); ...
[ "public", "final", "void", "validate", "(", "Method", "method", ")", "throws", "ValidationException", "{", "final", "Validator", "<", "CalendarComponent", ">", "validator", "=", "getValidator", "(", "method", ")", ";", "if", "(", "validator", "!=", "null", ")"...
Performs method-specific ITIP validation. @param method the applicable method @throws ValidationException where the component does not comply with RFC2446
[ "Performs", "method", "-", "specific", "ITIP", "validation", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/CalendarComponent.java#L81-L89
115,215
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Period.java
Period.getDuration
public final TemporalAmount getDuration() { if (duration == null) { return TemporalAmountAdapter.fromDateRange(getStart(), getEnd()).getDuration(); } return duration.getDuration(); }
java
public final TemporalAmount getDuration() { if (duration == null) { return TemporalAmountAdapter.fromDateRange(getStart(), getEnd()).getDuration(); } return duration.getDuration(); }
[ "public", "final", "TemporalAmount", "getDuration", "(", ")", "{", "if", "(", "duration", "==", "null", ")", "{", "return", "TemporalAmountAdapter", ".", "fromDateRange", "(", "getStart", "(", ")", ",", "getEnd", "(", ")", ")", ".", "getDuration", "(", ")"...
Returns the duration of this period. If an explicit duration is not specified, the duration is derived from the end date. @return the duration of this period in milliseconds.
[ "Returns", "the", "duration", "of", "this", "period", ".", "If", "an", "explicit", "duration", "is", "not", "specified", "the", "duration", "is", "derived", "from", "the", "end", "date", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Period.java#L162-L167
115,216
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Period.java
Period.subtract
public final PeriodList subtract(final Period period) { final PeriodList result = new PeriodList(); if (period.contains(this)) { return result; } else if (!period.intersects(this)) { result.add(this); return result; } ...
java
public final PeriodList subtract(final Period period) { final PeriodList result = new PeriodList(); if (period.contains(this)) { return result; } else if (!period.intersects(this)) { result.add(this); return result; } ...
[ "public", "final", "PeriodList", "subtract", "(", "final", "Period", "period", ")", "{", "final", "PeriodList", "result", "=", "new", "PeriodList", "(", ")", ";", "if", "(", "period", ".", "contains", "(", "this", ")", ")", "{", "return", "result", ";", ...
Creates a set of periods resulting from the subtraction of the specified period from this one. If the specified period is completely contained in this period, the resulting list will contain two periods. Otherwise it will contain one. If the specified period does not interest this period a list containing this period i...
[ "Creates", "a", "set", "of", "periods", "resulting", "from", "the", "subtraction", "of", "the", "specified", "period", "from", "this", "one", ".", "If", "the", "specified", "period", "is", "completely", "contained", "in", "this", "period", "the", "resulting", ...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Period.java#L247-L280
115,217
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Period.java
Period.compareTo
public final int compareTo(final Period arg0) { // Throws documented exception if type is wrong or parameter is null if (arg0 == null) { throw new ClassCastException("Cannot compare this object to null"); } final int startCompare = getStart().compareTo(arg0.getStart()); ...
java
public final int compareTo(final Period arg0) { // Throws documented exception if type is wrong or parameter is null if (arg0 == null) { throw new ClassCastException("Cannot compare this object to null"); } final int startCompare = getStart().compareTo(arg0.getStart()); ...
[ "public", "final", "int", "compareTo", "(", "final", "Period", "arg0", ")", "{", "// Throws documented exception if type is wrong or parameter is null", "if", "(", "arg0", "==", "null", ")", "{", "throw", "new", "ClassCastException", "(", "\"Cannot compare this object to ...
Compares the specified period with this period. First, compare the start dates. If they are the same, compare the end dates. @param arg0 a period to compare with this one @return a postive value if this period is greater, negative if the other is greater, or zero if they are equal
[ "Compares", "the", "specified", "period", "with", "this", "period", ".", "First", "compare", "the", "start", "dates", ".", "If", "they", "are", "the", "same", "compare", "the", "end", "dates", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Period.java#L337-L355
115,218
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/TimeZone.java
TimeZone.inDaylightTime
public final boolean inDaylightTime(final Date date) { final Observance observance = vTimeZone.getApplicableObservance(new DateTime(date)); return (observance instanceof Daylight); }
java
public final boolean inDaylightTime(final Date date) { final Observance observance = vTimeZone.getApplicableObservance(new DateTime(date)); return (observance instanceof Daylight); }
[ "public", "final", "boolean", "inDaylightTime", "(", "final", "Date", "date", ")", "{", "final", "Observance", "observance", "=", "vTimeZone", ".", "getApplicableObservance", "(", "new", "DateTime", "(", "date", ")", ")", ";", "return", "(", "observance", "ins...
Determines if the specified date is in daylight time according to this timezone. This is done by finding the latest supporting observance for the specified date and identifying whether it is daylight time. @param date a date instance @return true if the specified date is in daylight time, otherwise false
[ "Determines", "if", "the", "specified", "date", "is", "in", "daylight", "time", "according", "to", "this", "timezone", ".", "This", "is", "done", "by", "finding", "the", "latest", "supporting", "observance", "for", "the", "specified", "date", "and", "identifyi...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/TimeZone.java#L136-L139
115,219
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ParameterList.java
ParameterList.getParameter
public final <T extends Parameter> T getParameter(final String aName) { for (final Parameter p : parameters) { if (aName.equalsIgnoreCase(p.getName())) { return (T) p; } } return null; }
java
public final <T extends Parameter> T getParameter(final String aName) { for (final Parameter p : parameters) { if (aName.equalsIgnoreCase(p.getName())) { return (T) p; } } return null; }
[ "public", "final", "<", "T", "extends", "Parameter", ">", "T", "getParameter", "(", "final", "String", "aName", ")", "{", "for", "(", "final", "Parameter", "p", ":", "parameters", ")", "{", "if", "(", "aName", ".", "equalsIgnoreCase", "(", "p", ".", "g...
Returns the first parameter with the specified name. @param aName name of the parameter @return the first matching parameter or null if no matching parameters
[ "Returns", "the", "first", "parameter", "with", "the", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ParameterList.java#L119-L126
115,220
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ParameterList.java
ParameterList.getParameters
public final ParameterList getParameters(final String name) { final ParameterList list = new ParameterList(); for (final Parameter p : parameters) { if (p.getName().equalsIgnoreCase(name)) { list.add(p); } } return list; }
java
public final ParameterList getParameters(final String name) { final ParameterList list = new ParameterList(); for (final Parameter p : parameters) { if (p.getName().equalsIgnoreCase(name)) { list.add(p); } } return list; }
[ "public", "final", "ParameterList", "getParameters", "(", "final", "String", "name", ")", "{", "final", "ParameterList", "list", "=", "new", "ParameterList", "(", ")", ";", "for", "(", "final", "Parameter", "p", ":", "parameters", ")", "{", "if", "(", "p",...
Returns a list of parameters with the specified name. @param name name of parameters to return @return a parameter list
[ "Returns", "a", "list", "of", "parameters", "with", "the", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ParameterList.java#L133-L141
115,221
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ParameterList.java
ParameterList.replace
public final boolean replace(final Parameter parameter) { for (Parameter parameter1 : getParameters(parameter.getName())) { remove(parameter1); } return add(parameter); }
java
public final boolean replace(final Parameter parameter) { for (Parameter parameter1 : getParameters(parameter.getName())) { remove(parameter1); } return add(parameter); }
[ "public", "final", "boolean", "replace", "(", "final", "Parameter", "parameter", ")", "{", "for", "(", "Parameter", "parameter1", ":", "getParameters", "(", "parameter", ".", "getName", "(", ")", ")", ")", "{", "remove", "(", "parameter1", ")", ";", "}", ...
Replace any parameters of the same type with the one specified. @param parameter parameter to add to this list in place of all others with the same name @return true if successfully added to this list
[ "Replace", "any", "parameters", "of", "the", "same", "type", "with", "the", "one", "specified", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ParameterList.java#L163-L168
115,222
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ParameterList.java
ParameterList.removeAll
public final void removeAll(final String paramName) { final ParameterList params = getParameters(paramName); parameters.removeAll(params.parameters); }
java
public final void removeAll(final String paramName) { final ParameterList params = getParameters(paramName); parameters.removeAll(params.parameters); }
[ "public", "final", "void", "removeAll", "(", "final", "String", "paramName", ")", "{", "final", "ParameterList", "params", "=", "getParameters", "(", "paramName", ")", ";", "parameters", ".", "removeAll", "(", "params", ".", "parameters", ")", ";", "}" ]
Remove all parameters with the specified name. @param paramName the name of parameters to remove
[ "Remove", "all", "parameters", "with", "the", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ParameterList.java#L200-L203
115,223
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ParameterFactoryImpl.java
ParameterFactoryImpl.createParameter
public Parameter createParameter(final String name, final String value) throws URISyntaxException { final ParameterFactory factory = getFactory(name); Parameter parameter; if (factory != null) { parameter = factory.createParameter(value); } else if (isExperimental...
java
public Parameter createParameter(final String name, final String value) throws URISyntaxException { final ParameterFactory factory = getFactory(name); Parameter parameter; if (factory != null) { parameter = factory.createParameter(value); } else if (isExperimental...
[ "public", "Parameter", "createParameter", "(", "final", "String", "name", ",", "final", "String", "value", ")", "throws", "URISyntaxException", "{", "final", "ParameterFactory", "factory", "=", "getFactory", "(", "name", ")", ";", "Parameter", "parameter", ";", ...
Creates a parameter. @param name name of the parameter @param value a parameter value @return a component @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected parameters
[ "Creates", "a", "parameter", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ParameterFactoryImpl.java#L73-L87
115,224
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Calendars.java
Calendars.load
public static Calendar load(final String filename) throws IOException, ParserException { return new CalendarBuilder().build(Files.newInputStream(Paths.get(filename))); }
java
public static Calendar load(final String filename) throws IOException, ParserException { return new CalendarBuilder().build(Files.newInputStream(Paths.get(filename))); }
[ "public", "static", "Calendar", "load", "(", "final", "String", "filename", ")", "throws", "IOException", ",", "ParserException", "{", "return", "new", "CalendarBuilder", "(", ")", ".", "build", "(", "Files", ".", "newInputStream", "(", "Paths", ".", "get", ...
Loads a calendar from the specified file. @param filename the name of the file from which to load calendar data @return returns a new calendar instance initialised from the specified file @throws IOException occurs when there is an error reading the specified file @throws ParserException occurs when the data in the spe...
[ "Loads", "a", "calendar", "from", "the", "specified", "file", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Calendars.java#L75-L77
115,225
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Calendars.java
Calendars.load
public static Calendar load(final URL url) throws IOException, ParserException { final CalendarBuilder builder = new CalendarBuilder(); return builder.build(url.openStream()); }
java
public static Calendar load(final URL url) throws IOException, ParserException { final CalendarBuilder builder = new CalendarBuilder(); return builder.build(url.openStream()); }
[ "public", "static", "Calendar", "load", "(", "final", "URL", "url", ")", "throws", "IOException", ",", "ParserException", "{", "final", "CalendarBuilder", "builder", "=", "new", "CalendarBuilder", "(", ")", ";", "return", "builder", ".", "build", "(", "url", ...
Loads a calendar from the specified URL. @param url the URL from which to load calendar data @return returns a new calendar instance initialised from the specified URL @throws IOException occurs when there is an error reading from the specified URL @throws ParserException occurs when the data in the specified URL is in...
[ "Loads", "a", "calendar", "from", "the", "specified", "URL", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Calendars.java#L86-L89
115,226
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Calendars.java
Calendars.wrap
public static Calendar wrap(final CalendarComponent... component) { final ComponentList<CalendarComponent> components = new ComponentList<>(Arrays.asList(component)); return new Calendar(components); }
java
public static Calendar wrap(final CalendarComponent... component) { final ComponentList<CalendarComponent> components = new ComponentList<>(Arrays.asList(component)); return new Calendar(components); }
[ "public", "static", "Calendar", "wrap", "(", "final", "CalendarComponent", "...", "component", ")", "{", "final", "ComponentList", "<", "CalendarComponent", ">", "components", "=", "new", "ComponentList", "<>", "(", "Arrays", ".", "asList", "(", "component", ")"...
Wraps a component in a calendar. @param component the component to wrap with a calendar @return a calendar containing the specified component
[ "Wraps", "a", "component", "in", "a", "calendar", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Calendars.java#L121-L124
115,227
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Calendars.java
Calendars.getUid
public static Uid getUid(final Calendar calendar) throws ConstraintViolationException { Uid uid = null; for (final Component c : calendar.getComponents()) { for (final Property foundUid : c.getProperties(Property.UID)) { if (uid != null && !uid.equals(foundUid)) { ...
java
public static Uid getUid(final Calendar calendar) throws ConstraintViolationException { Uid uid = null; for (final Component c : calendar.getComponents()) { for (final Property foundUid : c.getProperties(Property.UID)) { if (uid != null && !uid.equals(foundUid)) { ...
[ "public", "static", "Uid", "getUid", "(", "final", "Calendar", "calendar", ")", "throws", "ConstraintViolationException", "{", "Uid", "uid", "=", "null", ";", "for", "(", "final", "Component", "c", ":", "calendar", ".", "getComponents", "(", ")", ")", "{", ...
Returns a unique identifier as specified by components in the provided calendar. @param calendar a calendar instance @return the UID property @throws ConstraintViolationException if zero or more than one unique identifer is found in the specified calendar
[ "Returns", "a", "unique", "identifier", "as", "specified", "by", "components", "in", "the", "provided", "calendar", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Calendars.java#L182-L196
115,228
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Calendars.java
Calendars.getContentType
public static String getContentType(Calendar calendar, Charset charset) { final StringBuilder b = new StringBuilder("text/calendar"); final Method method = calendar.getProperty(Property.METHOD); if (method != null) { b.append("; method="); b.append(method.getValu...
java
public static String getContentType(Calendar calendar, Charset charset) { final StringBuilder b = new StringBuilder("text/calendar"); final Method method = calendar.getProperty(Property.METHOD); if (method != null) { b.append("; method="); b.append(method.getValu...
[ "public", "static", "String", "getContentType", "(", "Calendar", "calendar", ",", "Charset", "charset", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", "\"text/calendar\"", ")", ";", "final", "Method", "method", "=", "calendar", ".", ...
Returns an appropriate MIME Content-Type for the specified calendar object. @param calendar a calendar instance @param charset an optional encoding @return a content type string
[ "Returns", "an", "appropriate", "MIME", "Content", "-", "Type", "for", "the", "specified", "calendar", "object", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Calendars.java#L204-L218
115,229
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/TimeZones.java
TimeZones.isUtc
public static boolean isUtc(final TimeZone timezone) { // return timezone.hasSameRules(TimeZone.getTimeZone(UTC_ID)); // return timezone.getRawOffset() == 0; return UTC_ID.equals(timezone.getID()) || IBM_UTC_ID.equals(timezone.getID()); }
java
public static boolean isUtc(final TimeZone timezone) { // return timezone.hasSameRules(TimeZone.getTimeZone(UTC_ID)); // return timezone.getRawOffset() == 0; return UTC_ID.equals(timezone.getID()) || IBM_UTC_ID.equals(timezone.getID()); }
[ "public", "static", "boolean", "isUtc", "(", "final", "TimeZone", "timezone", ")", "{", "// return timezone.hasSameRules(TimeZone.getTimeZone(UTC_ID));", "// return timezone.getRawOffset() == 0;", "return", "UTC_ID", ".", "equals", "(", "timezone", ".", "getID", ...
Indicates whether the specified timezone is equivalent to UTC time. @param timezone a timezone instance @return true if the timezone is UTC time, otherwise false
[ "Indicates", "whether", "the", "specified", "timezone", "is", "equivalent", "to", "UTC", "time", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/TimeZones.java#L77-L82
115,230
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VTimeZone.java
VTimeZone.getApplicableObservance
public final Observance getApplicableObservance(final Date date) { Observance latestObservance = null; Date latestOnset = null; for (final Observance observance : getObservances()) { final Date onset = observance.getLatestOnset(date); if (latestOnset == null ...
java
public final Observance getApplicableObservance(final Date date) { Observance latestObservance = null; Date latestOnset = null; for (final Observance observance : getObservances()) { final Date onset = observance.getLatestOnset(date); if (latestOnset == null ...
[ "public", "final", "Observance", "getApplicableObservance", "(", "final", "Date", "date", ")", "{", "Observance", "latestObservance", "=", "null", ";", "Date", "latestOnset", "=", "null", ";", "for", "(", "final", "Observance", "observance", ":", "getObservances",...
Returns the latest applicable timezone observance for the specified date. @param date the latest possible date for a timezone observance onset @return the latest applicable timezone observance for the specified date or null if there are no applicable observances
[ "Returns", "the", "latest", "applicable", "timezone", "observance", "for", "the", "specified", "date", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VTimeZone.java#L247-L259
115,231
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VTimeZone.java
VTimeZone.copy
public Component copy() throws ParseException, IOException, URISyntaxException { final VTimeZone copy = (VTimeZone) super.copy(); copy.observances = new ComponentList<Observance>(observances); return copy; }
java
public Component copy() throws ParseException, IOException, URISyntaxException { final VTimeZone copy = (VTimeZone) super.copy(); copy.observances = new ComponentList<Observance>(observances); return copy; }
[ "public", "Component", "copy", "(", ")", "throws", "ParseException", ",", "IOException", ",", "URISyntaxException", "{", "final", "VTimeZone", "copy", "=", "(", "VTimeZone", ")", "super", ".", "copy", "(", ")", ";", "copy", ".", "observances", "=", "new", ...
Overrides default copy method to add support for copying observance sub-components. @return a copy of the instance @throws ParseException where an error occurs parsing data @throws IOException where an error occurs reading data @throws URISyntaxException where an invalid URI is encountered @see net.fortuna.ical4j.model...
[ "Overrides", "default", "copy", "method", "to", "add", "support", "for", "copying", "observance", "sub", "-", "components", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VTimeZone.java#L310-L314
115,232
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Dates.java
Dates.getInstance
public static Date getInstance(final java.util.Date date, final Value type) { if (Value.DATE.equals(type)) { return new Date(date); } return new DateTime(date); }
java
public static Date getInstance(final java.util.Date date, final Value type) { if (Value.DATE.equals(type)) { return new Date(date); } return new DateTime(date); }
[ "public", "static", "Date", "getInstance", "(", "final", "java", ".", "util", ".", "Date", "date", ",", "final", "Value", "type", ")", "{", "if", "(", "Value", ".", "DATE", ".", "equals", "(", "type", ")", ")", "{", "return", "new", "Date", "(", "d...
Returns a new date instance of the specified type. If no type is specified a DateTime instance is returned. @param date a seed Java date instance @param type the type of date instance @return an instance of <code>net.fortuna.ical4j.model.Date</code>
[ "Returns", "a", "new", "date", "instance", "of", "the", "specified", "type", ".", "If", "no", "type", "is", "specified", "a", "DateTime", "instance", "is", "returned", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Dates.java#L220-L225
115,233
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Dates.java
Dates.getDateListInstance
public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
java
public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
[ "public", "static", "DateList", "getDateListInstance", "(", "final", "DateList", "origList", ")", "{", "final", "DateList", "list", "=", "new", "DateList", "(", "origList", ".", "getType", "(", ")", ")", ";", "if", "(", "origList", ".", "isUtc", "(", ")", ...
Instantiate a new datelist with the same type, timezone and utc settings as the origList. @param origList @return a new empty list.
[ "Instantiate", "a", "new", "datelist", "with", "the", "same", "type", "timezone", "and", "utc", "settings", "as", "the", "origList", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Dates.java#L261-L269
115,234
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/Dates.java
Dates.round
public static long round(final long time, final int precision, final TimeZone tz) { if ((precision == PRECISION_SECOND) && ((time % Dates.MILLIS_PER_SECOND) == 0)) { return time; } final Calendar cal = Calendar.getInstance(tz); cal.setTimeInMillis(time); if (precision...
java
public static long round(final long time, final int precision, final TimeZone tz) { if ((precision == PRECISION_SECOND) && ((time % Dates.MILLIS_PER_SECOND) == 0)) { return time; } final Calendar cal = Calendar.getInstance(tz); cal.setTimeInMillis(time); if (precision...
[ "public", "static", "long", "round", "(", "final", "long", "time", ",", "final", "int", "precision", ",", "final", "TimeZone", "tz", ")", "{", "if", "(", "(", "precision", "==", "PRECISION_SECOND", ")", "&&", "(", "(", "time", "%", "Dates", ".", "MILLI...
Rounds a time value to remove any precision smaller than specified. @param time the time value to round @param precision the rounding precision @param tz the timezone of the rounded value @return a round time value
[ "Rounds", "a", "time", "value", "to", "remove", "any", "precision", "smaller", "than", "specified", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/Dates.java#L303-L322
115,235
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateTime.java
DateTime.setTime
private void setTime(final String value, final DateFormat format, final java.util.TimeZone tz) throws ParseException { if (tz != null) { format.setTimeZone(tz); } setTime(format.parse(value).getTime()); }
java
private void setTime(final String value, final DateFormat format, final java.util.TimeZone tz) throws ParseException { if (tz != null) { format.setTimeZone(tz); } setTime(format.parse(value).getTime()); }
[ "private", "void", "setTime", "(", "final", "String", "value", ",", "final", "DateFormat", "format", ",", "final", "java", ".", "util", ".", "TimeZone", "tz", ")", "throws", "ParseException", "{", "if", "(", "tz", "!=", "null", ")", "{", "format", ".", ...
Internal set of time by parsing value string. @param value @param format a {@code DateFormat}, protected by the use of a ThreadLocal. @param tz @throws ParseException
[ "Internal", "set", "of", "time", "by", "parsing", "value", "string", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateTime.java#L409-L416
115,236
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateTime.java
DateTime.setUtc
public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
java
public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
[ "public", "final", "void", "setUtc", "(", "final", "boolean", "utc", ")", "{", "// reset the timezone associated with this instance..", "this", ".", "timezone", "=", "null", ";", "if", "(", "utc", ")", "{", "getFormat", "(", ")", ".", "setTimeZone", "(", "Time...
Updates this date-time to display in UTC time if the argument is true. Otherwise, resets to the default timezone. @param utc The utc to set.
[ "Updates", "this", "date", "-", "time", "to", "display", "in", "UTC", "time", "if", "the", "argument", "is", "true", ".", "Otherwise", "resets", "to", "the", "default", "timezone", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateTime.java#L445-L454
115,237
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/Observance.java
Observance.getCachedOnset
private DateTime getCachedOnset(final Date date) { int index = Arrays.binarySearch(onsetsMillisec, date.getTime()); if (index >= 0) { return onsetsDates[index]; } else { int insertionIndex = -index - 1; return onsetsDates[insertionIndex - 1]; } }
java
private DateTime getCachedOnset(final Date date) { int index = Arrays.binarySearch(onsetsMillisec, date.getTime()); if (index >= 0) { return onsetsDates[index]; } else { int insertionIndex = -index - 1; return onsetsDates[insertionIndex - 1]; } }
[ "private", "DateTime", "getCachedOnset", "(", "final", "Date", "date", ")", "{", "int", "index", "=", "Arrays", ".", "binarySearch", "(", "onsetsMillisec", ",", "date", ".", "getTime", "(", ")", ")", ";", "if", "(", "index", ">=", "0", ")", "{", "retur...
Returns a cached onset for the specified date. @param date @return a cached onset date or null if no cached onset is applicable for the specified date
[ "Returns", "a", "cached", "onset", "for", "the", "specified", "date", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/Observance.java#L262-L270
115,238
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/property/Attach.java
Attach.setValue
public final void setValue(final String aValue) throws URISyntaxException { // determine if ATTACH is a URI or an embedded // binary.. if (getParameter(Parameter.ENCODING) != null) { // binary = Base64.decode(aValue); try { final BinaryDecoder...
java
public final void setValue(final String aValue) throws URISyntaxException { // determine if ATTACH is a URI or an embedded // binary.. if (getParameter(Parameter.ENCODING) != null) { // binary = Base64.decode(aValue); try { final BinaryDecoder...
[ "public", "final", "void", "setValue", "(", "final", "String", "aValue", ")", "throws", "URISyntaxException", "{", "// determine if ATTACH is a URI or an embedded", "// binary..", "if", "(", "getParameter", "(", "Parameter", ".", "ENCODING", ")", "!=", "null", ")", ...
Sets the current value of the Attach instance. If the specified value is encoded binary data, the value is decoded and stored in the binary field. Otherwise the value is assumed to be a URI location to binary data and is stored as such. @param aValue a string encoded binary or URI value @throws URISyntaxException wher...
[ "Sets", "the", "current", "value", "of", "the", "Attach", "instance", ".", "If", "the", "specified", "value", "is", "encoded", "binary", "data", "the", "value", "is", "decoded", "and", "stored", "in", "the", "binary", "field", ".", "Otherwise", "the", "val...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/property/Attach.java#L227-L251
115,239
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Parameter.java
Parameter.copy
public <T extends Parameter> T copy() throws URISyntaxException { if (factory == null) { throw new UnsupportedOperationException("No factory specified"); } return (T) factory.createParameter(getValue()); }
java
public <T extends Parameter> T copy() throws URISyntaxException { if (factory == null) { throw new UnsupportedOperationException("No factory specified"); } return (T) factory.createParameter(getValue()); }
[ "public", "<", "T", "extends", "Parameter", ">", "T", "copy", "(", ")", "throws", "URISyntaxException", "{", "if", "(", "factory", "==", "null", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"No factory specified\"", ")", ";", "}", "return"...
Deep copy of parameter. @return new parameter @throws URISyntaxException where an invalid URI is encountered
[ "Deep", "copy", "of", "parameter", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Parameter.java#L258-L263
115,240
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java
PropertyValidator.assertOneOrLess
public void assertOneOrLess(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {propertyName}); } }
java
public void assertOneOrLess(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {propertyName}); } }
[ "public", "void", "assertOneOrLess", "(", "final", "String", "propertyName", ",", "final", "PropertyList", "properties", ")", "throws", "ValidationException", "{", "if", "(", "properties", ".", "getProperties", "(", "propertyName", ")", ".", "size", "(", ")", ">...
Ensure a property occurs no more than once. @param propertyName the property name @param properties a list of properties to query @throws ValidationException when the specified property occurs more than once
[ "Ensure", "a", "property", "occurs", "no", "more", "than", "once", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java#L71-L77
115,241
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java
PropertyValidator.assertOneOrMore
public void assertOneOrMore(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() < 1) { throw new ValidationException(ASSERT_ONE_OR_MORE_MESSAGE, new Object[] {propertyName}); } }
java
public void assertOneOrMore(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() < 1) { throw new ValidationException(ASSERT_ONE_OR_MORE_MESSAGE, new Object[] {propertyName}); } }
[ "public", "void", "assertOneOrMore", "(", "final", "String", "propertyName", ",", "final", "PropertyList", "properties", ")", "throws", "ValidationException", "{", "if", "(", "properties", ".", "getProperties", "(", "propertyName", ")", ".", "size", "(", ")", "<...
Ensure a property occurs at least once. @param propertyName the property name @param properties a list of properties to query @throws ValidationException when the specified property occurs more than once
[ "Ensure", "a", "property", "occurs", "at", "least", "once", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java#L89-L95
115,242
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java
PropertyValidator.assertOne
public void assertOne(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {propertyName}); } }
java
public void assertOne(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperties(propertyName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {propertyName}); } }
[ "public", "void", "assertOne", "(", "final", "String", "propertyName", ",", "final", "PropertyList", "properties", ")", "throws", "ValidationException", "{", "if", "(", "properties", ".", "getProperties", "(", "propertyName", ")", ".", "size", "(", ")", "!=", ...
Ensure a property occurs once. @param propertyName the property name @param properties a list of properties to query @throws ValidationException when the specified property does not occur once
[ "Ensure", "a", "property", "occurs", "once", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java#L107-L113
115,243
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java
PropertyValidator.assertNone
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperty(propertyName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName}); } }
java
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException { if (properties.getProperty(propertyName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName}); } }
[ "public", "void", "assertNone", "(", "final", "String", "propertyName", ",", "final", "PropertyList", "properties", ")", "throws", "ValidationException", "{", "if", "(", "properties", ".", "getProperty", "(", "propertyName", ")", "!=", "null", ")", "{", "throw",...
Ensure a property doesn't occur in the specified list. @param propertyName the name of a property @param properties a list of properties @throws ValidationException thrown when the specified property is found in the list of properties
[ "Ensure", "a", "property", "doesn", "t", "occur", "in", "the", "specified", "list", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/PropertyValidator.java#L122-L126
115,244
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ComponentFactoryImpl.java
ComponentFactoryImpl.createComponent
@SuppressWarnings("unchecked") public <T extends Component> T createComponent(final String name, final PropertyList properties, final ComponentList<? extends Component> components) { Component component; ComponentFactory factory = getFactory(name); ...
java
@SuppressWarnings("unchecked") public <T extends Component> T createComponent(final String name, final PropertyList properties, final ComponentList<? extends Component> components) { Component component; ComponentFactory factory = getFactory(name); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "Component", ">", "T", "createComponent", "(", "final", "String", "name", ",", "final", "PropertyList", "properties", ",", "final", "ComponentList", "<", "?", "extends", "Componen...
Creates a component which contains sub-components. Currently the only such component is VTIMEZONE. @param name name of the component @param properties a list of component properties @param components a list of sub-components (namely standard/daylight timezones) @return a component
[ "Creates", "a", "component", "which", "contains", "sub", "-", "components", ".", "Currently", "the", "only", "such", "component", "is", "VTIMEZONE", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ComponentFactoryImpl.java#L113-L124
115,245
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarBuilder.java
CalendarBuilder.build
public Calendar build(final InputStream in) throws IOException, ParserException { return build(new InputStreamReader(in, DEFAULT_CHARSET)); }
java
public Calendar build(final InputStream in) throws IOException, ParserException { return build(new InputStreamReader(in, DEFAULT_CHARSET)); }
[ "public", "Calendar", "build", "(", "final", "InputStream", "in", ")", "throws", "IOException", ",", "ParserException", "{", "return", "build", "(", "new", "InputStreamReader", "(", "in", ",", "DEFAULT_CHARSET", ")", ")", ";", "}" ]
Builds an iCalendar model from the specified input stream. @param in an input stream to read calendar data from @return a calendar parsed from the specified input stream @throws IOException where an error occurs reading data from the specified stream @throws ParserException where an error occurs parsing data from ...
[ "Builds", "an", "iCalendar", "model", "from", "the", "specified", "input", "stream", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarBuilder.java#L157-L159
115,246
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarBuilder.java
CalendarBuilder.build
public Calendar build(final UnfoldingReader uin) throws IOException, ParserException { parser.parse(uin, contentHandler); return calendar; }
java
public Calendar build(final UnfoldingReader uin) throws IOException, ParserException { parser.parse(uin, contentHandler); return calendar; }
[ "public", "Calendar", "build", "(", "final", "UnfoldingReader", "uin", ")", "throws", "IOException", ",", "ParserException", "{", "parser", ".", "parse", "(", "uin", ",", "contentHandler", ")", ";", "return", "calendar", ";", "}" ]
Build an iCalendar model by parsing data from the specified reader. @param uin an unfolding reader to read data from @return a calendar parsed from the specified reader @throws IOException where an error occurs reading data from the specified reader @throws ParserException where an error occurs parsing data from t...
[ "Build", "an", "iCalendar", "model", "by", "parsing", "data", "from", "the", "specified", "reader", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarBuilder.java#L182-L185
115,247
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateList.java
DateList.add
public final boolean add(final Date date) { if (!this.isUtc() && this.getTimeZone() == null) { /* If list hasn't been initialized yet use defaults from the first added date element */ if (date instanceof DateTime) { DateTime dateTime = (DateTime) date; if ...
java
public final boolean add(final Date date) { if (!this.isUtc() && this.getTimeZone() == null) { /* If list hasn't been initialized yet use defaults from the first added date element */ if (date instanceof DateTime) { DateTime dateTime = (DateTime) date; if ...
[ "public", "final", "boolean", "add", "(", "final", "Date", "date", ")", "{", "if", "(", "!", "this", ".", "isUtc", "(", ")", "&&", "this", ".", "getTimeZone", "(", ")", "==", "null", ")", "{", "/* If list hasn't been initialized yet use defaults from the first...
Add a date to the list. The date will be updated to reflect the timezone of this list. @param date the date to add @return true @see List#add(java.lang.Object)
[ "Add", "a", "date", "to", "the", "list", ".", "The", "date", "will", "be", "updated", "to", "reflect", "the", "timezone", "of", "this", "list", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateList.java#L182-L207
115,248
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/TimeZoneLoader.java
TimeZoneLoader.loadVTimeZone
public VTimeZone loadVTimeZone(String id) throws IOException, ParserException, ParseException { Validate.notBlank(id, "Invalid TimeZone ID: [%s]", id); if (!cache.containsId(id)) { final URL resource = ResourceLoader.getResource(resourcePrefix + id + ".ics"); if (resource != null...
java
public VTimeZone loadVTimeZone(String id) throws IOException, ParserException, ParseException { Validate.notBlank(id, "Invalid TimeZone ID: [%s]", id); if (!cache.containsId(id)) { final URL resource = ResourceLoader.getResource(resourcePrefix + id + ".ics"); if (resource != null...
[ "public", "VTimeZone", "loadVTimeZone", "(", "String", "id", ")", "throws", "IOException", ",", "ParserException", ",", "ParseException", "{", "Validate", ".", "notBlank", "(", "id", ",", "\"Invalid TimeZone ID: [%s]\"", ",", "id", ")", ";", "if", "(", "!", "c...
Loads an existing VTimeZone from the classpath corresponding to the specified Java timezone. @throws ParseException
[ "Loads", "an", "existing", "VTimeZone", "from", "the", "classpath", "corresponding", "to", "the", "specified", "Java", "timezone", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/TimeZoneLoader.java#L98-L120
115,249
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Calendar.java
Calendar.getComponents
public final <C extends CalendarComponent> ComponentList<C> getComponents(final String name) { return getComponents().getComponents(name); }
java
public final <C extends CalendarComponent> ComponentList<C> getComponents(final String name) { return getComponents().getComponents(name); }
[ "public", "final", "<", "C", "extends", "CalendarComponent", ">", "ComponentList", "<", "C", ">", "getComponents", "(", "final", "String", "name", ")", "{", "return", "getComponents", "(", ")", ".", "getComponents", "(", "name", ")", ";", "}" ]
Convenience method for retrieving a list of named components. @param name name of components to retrieve @return a component list containing only components with the specified name
[ "Convenience", "method", "for", "retrieving", "a", "list", "of", "named", "components", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Calendar.java#L221-L223
115,250
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java
ParameterValidator.assertOneOrLess
public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
java
public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
[ "public", "void", "assertOneOrLess", "(", "final", "String", "paramName", ",", "final", "ParameterList", "parameters", ")", "throws", "ValidationException", "{", "if", "(", "parameters", ".", "getParameters", "(", "paramName", ")", ".", "size", "(", ")", ">", ...
Ensure a parameter occurs no more than once. @param paramName the parameter name @param parameters a list of parameters to query @throws ValidationException when the specified parameter occurs more than once
[ "Ensure", "a", "parameter", "occurs", "no", "more", "than", "once", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java#L73-L79
115,251
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java
ParameterValidator.assertOne
public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
java
public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
[ "public", "void", "assertOne", "(", "final", "String", "paramName", ",", "final", "ParameterList", "parameters", ")", "throws", "ValidationException", "{", "if", "(", "parameters", ".", "getParameters", "(", "paramName", ")", ".", "size", "(", ")", "!=", "1", ...
Ensure a parameter occurs once. @param paramName the parameter name @param parameters a list of parameters to query @throws ValidationException when the specified parameter does not occur once
[ "Ensure", "a", "parameter", "occurs", "once", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java#L91-L97
115,252
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java
ParameterValidator.assertNone
public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
java
public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
[ "public", "void", "assertNone", "(", "final", "String", "paramName", ",", "final", "ParameterList", "parameters", ")", "throws", "ValidationException", "{", "if", "(", "parameters", ".", "getParameter", "(", "paramName", ")", "!=", "null", ")", "{", "throw", "...
Ensure a parameter doesn't occur in the specified list. @param paramName the name of a parameter @param parameters a list of parameters @throws ValidationException thrown when the specified property is found in the list of properties
[ "Ensure", "a", "parameter", "doesn", "t", "occur", "in", "the", "specified", "list", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java#L106-L110
115,253
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ComponentGroup.java
ComponentGroup.calculateRecurrenceSet
public PeriodList calculateRecurrenceSet(final Period period) { PeriodList periods = new PeriodList(); for (Component component : getRevisions()) { periods = periods.add(component.calculateRecurrenceSet(period)); } return periods; }
java
public PeriodList calculateRecurrenceSet(final Period period) { PeriodList periods = new PeriodList(); for (Component component : getRevisions()) { periods = periods.add(component.calculateRecurrenceSet(period)); } return periods; }
[ "public", "PeriodList", "calculateRecurrenceSet", "(", "final", "Period", "period", ")", "{", "PeriodList", "periods", "=", "new", "PeriodList", "(", ")", ";", "for", "(", "Component", "component", ":", "getRevisions", "(", ")", ")", "{", "periods", "=", "pe...
Calculate all recurring periods for the specified date range. This method will take all revisions into account when generating the set. @param period @return @see Component#calculateRecurrenceSet(Period)
[ "Calculate", "all", "recurring", "periods", "for", "the", "specified", "date", "range", ".", "This", "method", "will", "take", "all", "revisions", "into", "account", "when", "generating", "the", "set", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ComponentGroup.java#L84-L92
115,254
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Recur.java
Recur.getDates
public final DateList getDates(final Date periodStart, final Date periodEnd, final Value value) { return getDates(periodStart, periodStart, periodEnd, value, -1); }
java
public final DateList getDates(final Date periodStart, final Date periodEnd, final Value value) { return getDates(periodStart, periodStart, periodEnd, value, -1); }
[ "public", "final", "DateList", "getDates", "(", "final", "Date", "periodStart", ",", "final", "Date", "periodEnd", ",", "final", "Value", "value", ")", "{", "return", "getDates", "(", "periodStart", ",", "periodStart", ",", "periodEnd", ",", "value", ",", "-...
Returns a list of start dates in the specified period represented by this recur. Any date fields not specified by this recur are retained from the period start, and as such you should ensure the period start is initialised correctly. @param periodStart the start of the period @param periodEnd the end of the period @...
[ "Returns", "a", "list", "of", "start", "dates", "in", "the", "specified", "period", "represented", "by", "this", "recur", ".", "Any", "date", "fields", "not", "specified", "by", "this", "recur", "are", "retained", "from", "the", "period", "start", "and", "...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Recur.java#L627-L630
115,255
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Recur.java
Recur.getDates
public final DateList getDates(final Date seed, final Period period, final Value value) { return getDates(seed, period.getStart(), period.getEnd(), value, -1); }
java
public final DateList getDates(final Date seed, final Period period, final Value value) { return getDates(seed, period.getStart(), period.getEnd(), value, -1); }
[ "public", "final", "DateList", "getDates", "(", "final", "Date", "seed", ",", "final", "Period", "period", ",", "final", "Value", "value", ")", "{", "return", "getDates", "(", "seed", ",", "period", ".", "getStart", "(", ")", ",", "period", ".", "getEnd"...
Convenience method for retrieving recurrences in a specified period. @param seed a seed date for generating recurrence instances @param period the period of returned recurrence dates @param value type of dates to generate @return a list of dates
[ "Convenience", "method", "for", "retrieving", "recurrences", "in", "a", "specified", "period", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Recur.java#L640-L643
115,256
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Recur.java
Recur.getNextDate
public final Date getNextDate(final Date seed, final Date startDate) { final Calendar cal = getCalendarInstance(seed, true); final Calendar rootSeed = (Calendar)cal.clone(); // optimize the start time for selecting candidates // (only applicable where a COUNT is not specified) ...
java
public final Date getNextDate(final Date seed, final Date startDate) { final Calendar cal = getCalendarInstance(seed, true); final Calendar rootSeed = (Calendar)cal.clone(); // optimize the start time for selecting candidates // (only applicable where a COUNT is not specified) ...
[ "public", "final", "Date", "getNextDate", "(", "final", "Date", "seed", ",", "final", "Date", "startDate", ")", "{", "final", "Calendar", "cal", "=", "getCalendarInstance", "(", "seed", ",", "true", ")", ";", "final", "Calendar", "rootSeed", "=", "(", "Cal...
Returns the the next date of this recurrence given a seed date and start date. The seed date indicates the start of the fist occurrence of this recurrence. The start date is the starting date to search for the next recurrence. Return null if there is no occurrence date after start date. @param seed the start da...
[ "Returns", "the", "the", "next", "date", "of", "this", "recurrence", "given", "a", "seed", "date", "and", "start", "date", ".", "The", "seed", "date", "indicates", "the", "start", "of", "the", "fist", "occurrence", "of", "this", "recurrence", ".", "The", ...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Recur.java#L788-L859
115,257
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Recur.java
Recur.increment
private void increment(final Calendar cal) { // initialise interval.. final int calInterval = (getInterval() >= 1) ? getInterval() : 1; cal.add(calIncField, calInterval); }
java
private void increment(final Calendar cal) { // initialise interval.. final int calInterval = (getInterval() >= 1) ? getInterval() : 1; cal.add(calIncField, calInterval); }
[ "private", "void", "increment", "(", "final", "Calendar", "cal", ")", "{", "// initialise interval..", "final", "int", "calInterval", "=", "(", "getInterval", "(", ")", ">=", "1", ")", "?", "getInterval", "(", ")", ":", "1", ";", "cal", ".", "add", "(", ...
Increments the specified calendar according to the frequency and interval specified in this recurrence rule. @param cal a java.util.Calendar to increment
[ "Increments", "the", "specified", "calendar", "according", "to", "the", "frequency", "and", "interval", "specified", "in", "this", "recurrence", "rule", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Recur.java#L866-L870
115,258
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarOutputter.java
CalendarOutputter.output
public final void output(final Calendar calendar, final OutputStream out) throws IOException, ValidationException { output(calendar, new OutputStreamWriter(out, DEFAULT_CHARSET)); }
java
public final void output(final Calendar calendar, final OutputStream out) throws IOException, ValidationException { output(calendar, new OutputStreamWriter(out, DEFAULT_CHARSET)); }
[ "public", "final", "void", "output", "(", "final", "Calendar", "calendar", ",", "final", "OutputStream", "out", ")", "throws", "IOException", ",", "ValidationException", "{", "output", "(", "calendar", ",", "new", "OutputStreamWriter", "(", "out", ",", "DEFAULT_...
Outputs an iCalender string to the specified output stream. @param calendar calendar to write to ouput stream @param out an output stream @throws IOException thrown when unable to write to output stream @throws ValidationException where calendar validation fails
[ "Outputs", "an", "iCalender", "string", "to", "the", "specified", "output", "stream", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarOutputter.java#L81-L84
115,259
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarOutputter.java
CalendarOutputter.output
public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } try (FoldingWriter writer = new FoldingWriter(out, foldLength)) { writer.write(calendar.toString()); ...
java
public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } try (FoldingWriter writer = new FoldingWriter(out, foldLength)) { writer.write(calendar.toString()); ...
[ "public", "final", "void", "output", "(", "final", "Calendar", "calendar", ",", "final", "Writer", "out", ")", "throws", "IOException", ",", "ValidationException", "{", "if", "(", "isValidating", "(", ")", ")", "{", "calendar", ".", "validate", "(", ")", "...
Outputs an iCalender string to the specified writer. @param calendar calendar to write to writer @param out a writer @throws IOException thrown when unable to write to writer @throws ValidationException where calendar validation fails
[ "Outputs", "an", "iCalender", "string", "to", "the", "specified", "writer", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarOutputter.java#L93-L102
115,260
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.parseCalendar
private void parseCalendar(final StreamTokenizer tokeniser, Reader in, final ContentHandler handler) throws IOException, ParseException, URISyntaxException, ParserException { assertToken(tokeniser, in, ':'); assertToken(tokeniser, in, Calendar.VCALENDAR, true, false); ...
java
private void parseCalendar(final StreamTokenizer tokeniser, Reader in, final ContentHandler handler) throws IOException, ParseException, URISyntaxException, ParserException { assertToken(tokeniser, in, ':'); assertToken(tokeniser, in, Calendar.VCALENDAR, true, false); ...
[ "private", "void", "parseCalendar", "(", "final", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "final", "ContentHandler", "handler", ")", "throws", "IOException", ",", "ParseException", ",", "URISyntaxException", ",", "ParserException", "{", "assertToken"...
Parses an iCalendar VCALENDAR from the specified stream tokeniser. @param tokeniser @param in @param handler @throws IOException @throws ParseException @throws URISyntaxException @throws ParserException
[ "Parses", "an", "iCalendar", "VCALENDAR", "from", "the", "specified", "stream", "tokeniser", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L102-L128
115,261
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.parseCalendarList
private void parseCalendarList(final StreamTokenizer tokeniser, Reader in, final ContentHandler handler) throws IOException, ParseException, URISyntaxException, ParserException { // BEGIN:VCALENDAR int ntok = assertToken(tokeniser, in, Calendar.BEGIN, false, true); whil...
java
private void parseCalendarList(final StreamTokenizer tokeniser, Reader in, final ContentHandler handler) throws IOException, ParseException, URISyntaxException, ParserException { // BEGIN:VCALENDAR int ntok = assertToken(tokeniser, in, Calendar.BEGIN, false, true); whil...
[ "private", "void", "parseCalendarList", "(", "final", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "final", "ContentHandler", "handler", ")", "throws", "IOException", ",", "ParseException", ",", "URISyntaxException", ",", "ParserException", "{", "// BEGIN...
Parses multiple VCALENDARs from the specified stream tokeniser. @param tokeniser @param handler @throws IOException @throws ParseException @throws URISyntaxException @throws ParserException
[ "Parses", "multiple", "VCALENDARs", "from", "the", "specified", "stream", "tokeniser", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L173-L183
115,262
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.assertToken
private int assertToken(final StreamTokenizer tokeniser, Reader in, final String token) throws IOException, ParserException { return assertToken(tokeniser, in, token, false, false); }
java
private int assertToken(final StreamTokenizer tokeniser, Reader in, final String token) throws IOException, ParserException { return assertToken(tokeniser, in, token, false, false); }
[ "private", "int", "assertToken", "(", "final", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "final", "String", "token", ")", "throws", "IOException", ",", "ParserException", "{", "return", "assertToken", "(", "tokeniser", ",", "in", ",", "token", ...
Asserts that the next token in the stream matches the specified token. This method is case-sensitive. @param tokeniser @param token @return int value of the ttype field of the tokeniser @throws IOException @throws ParserException
[ "Asserts", "that", "the", "next", "token", "in", "the", "stream", "matches", "the", "specified", "token", ".", "This", "method", "is", "case", "-", "sensitive", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L485-L488
115,263
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.skipNewLines
private int skipNewLines(StreamTokenizer tokeniser, Reader in, String token) throws ParserException, IOException { for (int i = 0;; i++) { try { return assertToken(tokeniser, in, StreamTokenizer.TT_WORD); } catch (ParserException exc) { //Skip a maximum of...
java
private int skipNewLines(StreamTokenizer tokeniser, Reader in, String token) throws ParserException, IOException { for (int i = 0;; i++) { try { return assertToken(tokeniser, in, StreamTokenizer.TT_WORD); } catch (ParserException exc) { //Skip a maximum of...
[ "private", "int", "skipNewLines", "(", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "String", "token", ")", "throws", "ParserException", ",", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", ";", "i", "++", ")", "{", "try", "{", ...
Skip newlines and linefeed at the beginning. @param tokeniser @param in @param token @return int value of the ttype field of the tokeniser @throws ParserException @throws IOException
[ "Skip", "newlines", "and", "linefeed", "at", "the", "beginning", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L542-L553
115,264
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.getSvalIgnoringBom
private String getSvalIgnoringBom(StreamTokenizer tokeniser, Reader in, String token) { if(tokeniser.sval != null) { if(tokeniser.sval.contains(token)) { return token; } } return tokeniser.sval; }
java
private String getSvalIgnoringBom(StreamTokenizer tokeniser, Reader in, String token) { if(tokeniser.sval != null) { if(tokeniser.sval.contains(token)) { return token; } } return tokeniser.sval; }
[ "private", "String", "getSvalIgnoringBom", "(", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "String", "token", ")", "{", "if", "(", "tokeniser", ".", "sval", "!=", "null", ")", "{", "if", "(", "tokeniser", ".", "sval", ".", "contains", "(", ...
Ignore BOM character. @param tokeniser @param in @param token @return
[ "Ignore", "BOM", "character", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L563-L570
115,265
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.absorbWhitespace
private int absorbWhitespace(final StreamTokenizer tokeniser, Reader in, boolean ignoreEOF) throws IOException, ParserException { // HACK: absorb extraneous whitespace between components (KOrganizer).. int ntok; while ((ntok = nextToken(tokeniser, in, ignoreEOF)) == StreamTokenizer.TT_EOL) { ...
java
private int absorbWhitespace(final StreamTokenizer tokeniser, Reader in, boolean ignoreEOF) throws IOException, ParserException { // HACK: absorb extraneous whitespace between components (KOrganizer).. int ntok; while ((ntok = nextToken(tokeniser, in, ignoreEOF)) == StreamTokenizer.TT_EOL) { ...
[ "private", "int", "absorbWhitespace", "(", "final", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "boolean", "ignoreEOF", ")", "throws", "IOException", ",", "ParserException", "{", "// HACK: absorb extraneous whitespace between components (KOrganizer)..", "int", ...
Absorbs extraneous newlines. @param tokeniser @param in @return int value of the ttype field of the tokeniser @throws IOException
[ "Absorbs", "extraneous", "newlines", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L580-L592
115,266
ical4j/ical4j
src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java
CalendarParserImpl.nextToken
private int nextToken(StreamTokenizer tokeniser, Reader in, boolean ignoreEOF) throws IOException, ParserException { int token = tokeniser.nextToken(); if (!ignoreEOF && token == StreamTokenizer.TT_EOF) { throw new ParserException("Unexpected end of file", getLineNumber(tokeniser, in)); ...
java
private int nextToken(StreamTokenizer tokeniser, Reader in, boolean ignoreEOF) throws IOException, ParserException { int token = tokeniser.nextToken(); if (!ignoreEOF && token == StreamTokenizer.TT_EOF) { throw new ParserException("Unexpected end of file", getLineNumber(tokeniser, in)); ...
[ "private", "int", "nextToken", "(", "StreamTokenizer", "tokeniser", ",", "Reader", "in", ",", "boolean", "ignoreEOF", ")", "throws", "IOException", ",", "ParserException", "{", "int", "token", "=", "tokeniser", ".", "nextToken", "(", ")", ";", "if", "(", "!"...
Reads the next token from the tokeniser. This method throws a ParseException when reading EOF. @param tokeniser @param in @param ignoreEOF @return int value of the ttype field of the tokeniser @throws ParseException When reading EOF.
[ "Reads", "the", "next", "token", "from", "the", "tokeniser", ".", "This", "method", "throws", "a", "ParseException", "when", "reading", "EOF", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/data/CalendarParserImpl.java#L634-L640
115,267
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/IndexedComponentList.java
IndexedComponentList.getComponents
public ComponentList<T> getComponents(final String propertyValue) { ComponentList<T> components = index.get(propertyValue); if (components == null) { components = EMPTY_LIST; } return components; }
java
public ComponentList<T> getComponents(final String propertyValue) { ComponentList<T> components = index.get(propertyValue); if (components == null) { components = EMPTY_LIST; } return components; }
[ "public", "ComponentList", "<", "T", ">", "getComponents", "(", "final", "String", "propertyValue", ")", "{", "ComponentList", "<", "T", ">", "components", "=", "index", ".", "get", "(", "propertyValue", ")", ";", "if", "(", "components", "==", "null", ")"...
Returns a list of components containing a property with the specified value. @param propertyValue the value of the property contained in the returned components @return a component list
[ "Returns", "a", "list", "of", "components", "containing", "a", "property", "with", "the", "specified", "value", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/IndexedComponentList.java#L79-L85
115,268
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/IndexedComponentList.java
IndexedComponentList.getComponent
public T getComponent(final String propertyValue) { final ComponentList<T> components = getComponents(propertyValue); if (!components.isEmpty()) { return components.get(0); } return null; }
java
public T getComponent(final String propertyValue) { final ComponentList<T> components = getComponents(propertyValue); if (!components.isEmpty()) { return components.get(0); } return null; }
[ "public", "T", "getComponent", "(", "final", "String", "propertyValue", ")", "{", "final", "ComponentList", "<", "T", ">", "components", "=", "getComponents", "(", "propertyValue", ")", ";", "if", "(", "!", "components", ".", "isEmpty", "(", ")", ")", "{",...
Returns the first component containing a property with the specified value. @param propertyValue the value of the property identified in the returned component @return a component or null if no component is found containing a property with the specified value
[ "Returns", "the", "first", "component", "containing", "a", "property", "with", "the", "specified", "value", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/IndexedComponentList.java#L95-L101
115,269
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/property/DateListProperty.java
DateListProperty.setTimeZone
public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(get...
java
public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(get...
[ "public", "void", "setTimeZone", "(", "final", "TimeZone", "timezone", ")", "{", "if", "(", "dates", "==", "null", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"TimeZone is not applicable to current value\"", ")", ";", "}", "this", ".", "timeZ...
Sets the timezone associated with this property. @param timezone a timezone to associate with this property
[ "Sets", "the", "timezone", "associated", "with", "this", "property", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/property/DateListProperty.java#L127-L146
115,270
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Dur.java
Dur.negate
public final Dur negate() { final Dur negated = new Dur(days, hours, minutes, seconds); negated.weeks = weeks; negated.negative = !negative; return negated; }
java
public final Dur negate() { final Dur negated = new Dur(days, hours, minutes, seconds); negated.weeks = weeks; negated.negative = !negative; return negated; }
[ "public", "final", "Dur", "negate", "(", ")", "{", "final", "Dur", "negated", "=", "new", "Dur", "(", "days", ",", "hours", ",", "minutes", ",", "seconds", ")", ";", "negated", ".", "weeks", "=", "weeks", ";", "negated", ".", "negative", "=", "!", ...
Provides a negation of this instance. @return a Dur instance that represents a negation of this instance
[ "Provides", "a", "negation", "of", "this", "instance", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Dur.java#L309-L314
115,271
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Dur.java
Dur.add
public final Dur add(final Dur duration) { if ((!isNegative() && duration.isNegative()) || (isNegative() && !duration.isNegative())) { throw new IllegalArgumentException( "Cannot add a negative and a positive duration"); } Dur sum; if (we...
java
public final Dur add(final Dur duration) { if ((!isNegative() && duration.isNegative()) || (isNegative() && !duration.isNegative())) { throw new IllegalArgumentException( "Cannot add a negative and a positive duration"); } Dur sum; if (we...
[ "public", "final", "Dur", "add", "(", "final", "Dur", "duration", ")", "{", "if", "(", "(", "!", "isNegative", "(", ")", "&&", "duration", ".", "isNegative", "(", ")", ")", "||", "(", "isNegative", "(", ")", "&&", "!", "duration", ".", "isNegative", ...
Add two durations. Durations may only be added if they are both positive or both negative durations. @param duration the duration to add to this duration @return a new instance representing the sum of the two durations.
[ "Add", "two", "durations", ".", "Durations", "may", "only", "be", "added", "if", "they", "are", "both", "positive", "or", "both", "negative", "durations", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Dur.java#L322-L371
115,272
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Dur.java
Dur.compareTo
public final int compareTo(final Dur arg0) { int result; if (isNegative() != arg0.isNegative()) { // return Boolean.valueOf(isNegative()).compareTo(Boolean.valueOf(arg0.isNegative())); // for pre-java 1.5 compatibility.. if (isNegative()) { return Inte...
java
public final int compareTo(final Dur arg0) { int result; if (isNegative() != arg0.isNegative()) { // return Boolean.valueOf(isNegative()).compareTo(Boolean.valueOf(arg0.isNegative())); // for pre-java 1.5 compatibility.. if (isNegative()) { return Inte...
[ "public", "final", "int", "compareTo", "(", "final", "Dur", "arg0", ")", "{", "int", "result", ";", "if", "(", "isNegative", "(", ")", "!=", "arg0", ".", "isNegative", "(", ")", ")", "{", "// return Boolean.valueOf(isNegative()).compareTo(Boolean.valueOf(arg0.isNe...
Compares this duration with another, acording to their length. @param arg0 another duration instance @return a postive value if this duration is longer, zero if the duration lengths are equal, otherwise a negative value
[ "Compares", "this", "duration", "with", "another", "acording", "to", "their", "length", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Dur.java#L420-L454
115,273
ical4j/ical4j
src/main/java/net/fortuna/ical4j/transform/recurrence/AbstractDateExpansionRule.java
AbstractDateExpansionRule.getCalendarInstance
protected Calendar getCalendarInstance(final Date date, final boolean lenient) { Calendar cal = Dates.getCalendarInstance(date); // A week should have at least 4 days to be considered as such per RFC5545 cal.setMinimalDaysInFirstWeek(4); cal.setFirstDayOfWeek(calendarWeekStartDay); ...
java
protected Calendar getCalendarInstance(final Date date, final boolean lenient) { Calendar cal = Dates.getCalendarInstance(date); // A week should have at least 4 days to be considered as such per RFC5545 cal.setMinimalDaysInFirstWeek(4); cal.setFirstDayOfWeek(calendarWeekStartDay); ...
[ "protected", "Calendar", "getCalendarInstance", "(", "final", "Date", "date", ",", "final", "boolean", "lenient", ")", "{", "Calendar", "cal", "=", "Dates", ".", "getCalendarInstance", "(", "date", ")", ";", "// A week should have at least 4 days to be considered as suc...
Construct a Calendar object and sets the time. @param date @param lenient @return
[ "Construct", "a", "Calendar", "object", "and", "sets", "the", "time", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/transform/recurrence/AbstractDateExpansionRule.java#L110-L119
115,274
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Component.java
Component.getProperties
public final <C extends Property> PropertyList<C> getProperties(final String name) { return getProperties().getProperties(name); }
java
public final <C extends Property> PropertyList<C> getProperties(final String name) { return getProperties().getProperties(name); }
[ "public", "final", "<", "C", "extends", "Property", ">", "PropertyList", "<", "C", ">", "getProperties", "(", "final", "String", "name", ")", "{", "return", "getProperties", "(", ")", ".", "getProperties", "(", "name", ")", ";", "}" ]
Convenience method for retrieving a list of named properties. @param name name of properties to retrieve @return a property list containing only properties with the specified name
[ "Convenience", "method", "for", "retrieving", "a", "list", "of", "named", "properties", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Component.java#L180-L182
115,275
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Component.java
Component.getProperty
public final <T extends Property> T getProperty(final String name) { return (T) getProperties().getProperty(name); }
java
public final <T extends Property> T getProperty(final String name) { return (T) getProperties().getProperty(name); }
[ "public", "final", "<", "T", "extends", "Property", ">", "T", "getProperty", "(", "final", "String", "name", ")", "{", "return", "(", "T", ")", "getProperties", "(", ")", ".", "getProperty", "(", "name", ")", ";", "}" ]
Convenience method for retrieving a named property. @param name name of the property to retrieve @return the first matching property in the property list with the specified name
[ "Convenience", "method", "for", "retrieving", "a", "named", "property", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Component.java#L190-L192
115,276
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Component.java
Component.getRequiredProperty
protected final Property getRequiredProperty(String name) throws ConstraintViolationException { Property p = getProperties().getProperty(name); if (p == null) { throw new ConstraintViolationException(String.format("Missing %s property", name)); } return p; }
java
protected final Property getRequiredProperty(String name) throws ConstraintViolationException { Property p = getProperties().getProperty(name); if (p == null) { throw new ConstraintViolationException(String.format("Missing %s property", name)); } return p; }
[ "protected", "final", "Property", "getRequiredProperty", "(", "String", "name", ")", "throws", "ConstraintViolationException", "{", "Property", "p", "=", "getProperties", "(", ")", ".", "getProperty", "(", "name", ")", ";", "if", "(", "p", "==", "null", ")", ...
Convenience method for retrieving a required named property. @param name name of the property to retrieve @return the first matching property in the property list with the specified name @throws ConstraintViolationException when a property is not found
[ "Convenience", "method", "for", "retrieving", "a", "required", "named", "property", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Component.java#L201-L207
115,277
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/WeekDay.java
WeekDay.getWeekDay
public static WeekDay getWeekDay(final Calendar cal) { return new WeekDay(getDay(cal.get(Calendar.DAY_OF_WEEK)), 0); }
java
public static WeekDay getWeekDay(final Calendar cal) { return new WeekDay(getDay(cal.get(Calendar.DAY_OF_WEEK)), 0); }
[ "public", "static", "WeekDay", "getWeekDay", "(", "final", "Calendar", "cal", ")", "{", "return", "new", "WeekDay", "(", "getDay", "(", "cal", ".", "get", "(", "Calendar", ".", "DAY_OF_WEEK", ")", ")", ",", "0", ")", ";", "}" ]
Returns a weekday representation of the specified calendar. @param cal a calendar (java.util) @return a weekday instance representing the specified calendar
[ "Returns", "a", "weekday", "representation", "of", "the", "specified", "calendar", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/WeekDay.java#L185-L187
115,278
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/WeekDay.java
WeekDay.getDay
public static WeekDay getDay(final int calDay) { WeekDay day = null; switch (calDay) { case Calendar.SUNDAY: day = SU; break; case Calendar.MONDAY: day = MO; break; case Calendar.TUESDAY: ...
java
public static WeekDay getDay(final int calDay) { WeekDay day = null; switch (calDay) { case Calendar.SUNDAY: day = SU; break; case Calendar.MONDAY: day = MO; break; case Calendar.TUESDAY: ...
[ "public", "static", "WeekDay", "getDay", "(", "final", "int", "calDay", ")", "{", "WeekDay", "day", "=", "null", ";", "switch", "(", "calDay", ")", "{", "case", "Calendar", ".", "SUNDAY", ":", "day", "=", "SU", ";", "break", ";", "case", "Calendar", ...
Returns the corresponding day constant to the specified java.util.Calendar.DAY_OF_WEEK property. @param calDay a property value of java.util.Calendar.DAY_OF_WEEK @return a string, or null if an invalid DAY_OF_WEEK property is specified
[ "Returns", "the", "corresponding", "day", "constant", "to", "the", "specified", "java", ".", "util", ".", "Calendar", ".", "DAY_OF_WEEK", "property", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/WeekDay.java#L214-L242
115,279
ical4j/ical4j
src/main/java/net/fortuna/ical4j/filter/Filter.java
Filter.filter
@SuppressWarnings("unchecked") public final Collection<T> filter(final Collection<T> c) { if (getRules() != null && getRules().length > 0) { // attempt to use the same concrete collection type // as is passed in.. Collection<T> filtered; try { ...
java
@SuppressWarnings("unchecked") public final Collection<T> filter(final Collection<T> c) { if (getRules() != null && getRules().length > 0) { // attempt to use the same concrete collection type // as is passed in.. Collection<T> filtered; try { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "Collection", "<", "T", ">", "filter", "(", "final", "Collection", "<", "T", ">", "c", ")", "{", "if", "(", "getRules", "(", ")", "!=", "null", "&&", "getRules", "(", ")", ".", "l...
Filter the given collection into a new collection. @param c a collection to filter @return a filtered collection
[ "Filter", "the", "given", "collection", "into", "a", "new", "collection", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/filter/Filter.java#L100-L120
115,280
ical4j/ical4j
src/main/java/net/fortuna/ical4j/filter/Filter.java
Filter.filter
@SuppressWarnings("unchecked") public final T[] filter(final T[] objects) { final Collection<T> filtered = filter(Arrays.asList(objects)); try { return filtered.toArray((T[]) Array.newInstance(objects .getClass(), filtered.size())); } catch (ArrayStoreExceptio...
java
@SuppressWarnings("unchecked") public final T[] filter(final T[] objects) { final Collection<T> filtered = filter(Arrays.asList(objects)); try { return filtered.toArray((T[]) Array.newInstance(objects .getClass(), filtered.size())); } catch (ArrayStoreExceptio...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "T", "[", "]", "filter", "(", "final", "T", "[", "]", "objects", ")", "{", "final", "Collection", "<", "T", ">", "filtered", "=", "filter", "(", "Arrays", ".", "asList", "(", "objec...
Returns a filtered subset of the specified array. @param objects an array to filter @return a filtered array
[ "Returns", "a", "filtered", "subset", "of", "the", "specified", "array", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/filter/Filter.java#L156-L167
115,281
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/component/VFreeBusy.java
VFreeBusy.getConsumedTime
private PeriodList getConsumedTime(final ComponentList<CalendarComponent> components, final DateTime rangeStart, final DateTime rangeEnd) { final PeriodList periods = new PeriodList(); // only events consume time.. for (final Component event : components.getComponents(Compon...
java
private PeriodList getConsumedTime(final ComponentList<CalendarComponent> components, final DateTime rangeStart, final DateTime rangeEnd) { final PeriodList periods = new PeriodList(); // only events consume time.. for (final Component event : components.getComponents(Compon...
[ "private", "PeriodList", "getConsumedTime", "(", "final", "ComponentList", "<", "CalendarComponent", ">", "components", ",", "final", "DateTime", "rangeStart", ",", "final", "DateTime", "rangeEnd", ")", "{", "final", "PeriodList", "periods", "=", "new", "PeriodList"...
Creates a list of periods representing the time consumed by the specified list of components. @param components @return
[ "Creates", "a", "list", "of", "periods", "representing", "the", "time", "consumed", "by", "the", "specified", "list", "of", "components", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/component/VFreeBusy.java#L468-L477
115,282
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/InetAddressHostInfo.java
InetAddressHostInfo.findNonLoopbackAddress
private static InetAddress findNonLoopbackAddress() throws SocketException { final Enumeration<NetworkInterface> enumInterfaceAddress = NetworkInterface.getNetworkInterfaces(); while (enumInterfaceAddress.hasMoreElements()) { final NetworkInterface netIf = enumInterfaceAddress.nextElement();...
java
private static InetAddress findNonLoopbackAddress() throws SocketException { final Enumeration<NetworkInterface> enumInterfaceAddress = NetworkInterface.getNetworkInterfaces(); while (enumInterfaceAddress.hasMoreElements()) { final NetworkInterface netIf = enumInterfaceAddress.nextElement();...
[ "private", "static", "InetAddress", "findNonLoopbackAddress", "(", ")", "throws", "SocketException", "{", "final", "Enumeration", "<", "NetworkInterface", ">", "enumInterfaceAddress", "=", "NetworkInterface", ".", "getNetworkInterfaces", "(", ")", ";", "while", "(", "...
Find a non loopback address for this machine on which to start the server. @return a non loopback address @throws SocketException if a socket error occurs
[ "Find", "a", "non", "loopback", "address", "for", "this", "machine", "on", "which", "to", "start", "the", "server", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/InetAddressHostInfo.java#L73-L88
115,283
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ComponentList.java
ComponentList.getComponent
public final T getComponent(final String aName) { for (final T c : this) { if (c.getName().equals(aName)) { return c; } } return null; }
java
public final T getComponent(final String aName) { for (final T c : this) { if (c.getName().equals(aName)) { return c; } } return null; }
[ "public", "final", "T", "getComponent", "(", "final", "String", "aName", ")", "{", "for", "(", "final", "T", "c", ":", "this", ")", "{", "if", "(", "c", ".", "getName", "(", ")", ".", "equals", "(", "aName", ")", ")", "{", "return", "c", ";", "...
Returns the first component of specified name. @param aName name of component to return @return a component or null if no matching component found
[ "Returns", "the", "first", "component", "of", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ComponentList.java#L103-L110
115,284
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/ComponentList.java
ComponentList.getComponents
@SuppressWarnings("unchecked") public final <C extends T> ComponentList<C> getComponents(final String name) { final ComponentList<C> components = new ComponentList<C>(); for (final T c : this) { if (c.getName().equals(name)) { components.add((C) c); } } ...
java
@SuppressWarnings("unchecked") public final <C extends T> ComponentList<C> getComponents(final String name) { final ComponentList<C> components = new ComponentList<C>(); for (final T c : this) { if (c.getName().equals(name)) { components.add((C) c); } } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "<", "C", "extends", "T", ">", "ComponentList", "<", "C", ">", "getComponents", "(", "final", "String", "name", ")", "{", "final", "ComponentList", "<", "C", ">", "components", "=", "ne...
Returns a list containing all components with specified name. @param name name of components to return @return a list of components with the matching name
[ "Returns", "a", "list", "containing", "all", "components", "with", "specified", "name", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/ComponentList.java#L117-L126
115,285
ical4j/ical4j
src/main/java/net/fortuna/ical4j/util/FixedUidGenerator.java
FixedUidGenerator.uniqueTimestamp
private static DateTime uniqueTimestamp() { long currentMillis; synchronized (FixedUidGenerator.class) { currentMillis = System.currentTimeMillis(); // guarantee uniqueness by ensuring timestamp is always greater // than the previous.. if (currentMillis < ...
java
private static DateTime uniqueTimestamp() { long currentMillis; synchronized (FixedUidGenerator.class) { currentMillis = System.currentTimeMillis(); // guarantee uniqueness by ensuring timestamp is always greater // than the previous.. if (currentMillis < ...
[ "private", "static", "DateTime", "uniqueTimestamp", "(", ")", "{", "long", "currentMillis", ";", "synchronized", "(", "FixedUidGenerator", ".", "class", ")", "{", "currentMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "// guarantee uniqueness by en...
Generates a timestamp guaranteed to be unique for the current JVM instance. @return a {@link DateTime} instance representing a unique timestamp
[ "Generates", "a", "timestamp", "guaranteed", "to", "be", "unique", "for", "the", "current", "JVM", "instance", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/util/FixedUidGenerator.java#L89-L106
115,286
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/PeriodList.java
PeriodList.add
public final boolean add(final Period period) { if (isUtc()) { period.setUtc(true); } else { period.setTimeZone(timezone); } return periods.add(period); }
java
public final boolean add(final Period period) { if (isUtc()) { period.setUtc(true); } else { period.setTimeZone(timezone); } return periods.add(period); }
[ "public", "final", "boolean", "add", "(", "final", "Period", "period", ")", "{", "if", "(", "isUtc", "(", ")", ")", "{", "period", ".", "setUtc", "(", "true", ")", ";", "}", "else", "{", "period", ".", "setTimeZone", "(", "timezone", ")", ";", "}",...
Add a period to the list. @param period the period to add @return true @see java.util.List#add(java.lang.Object)
[ "Add", "a", "period", "to", "the", "list", "." ]
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/PeriodList.java#L123-L131
115,287
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/PeriodList.java
PeriodList.add
public final PeriodList add(final PeriodList periods) { if (periods != null) { final PeriodList newList = new PeriodList(); newList.addAll(this); newList.addAll(periods); return newList.normalise(); } return this; }
java
public final PeriodList add(final PeriodList periods) { if (periods != null) { final PeriodList newList = new PeriodList(); newList.addAll(this); newList.addAll(periods); return newList.normalise(); } return this; }
[ "public", "final", "PeriodList", "add", "(", "final", "PeriodList", "periods", ")", "{", "if", "(", "periods", "!=", "null", ")", "{", "final", "PeriodList", "newList", "=", "new", "PeriodList", "(", ")", ";", "newList", ".", "addAll", "(", "this", ")", ...
A convenience method that combines all the periods in the specified list to this list. The result returned is a new PeriodList instance, except where no periods are specified in the arguments. In such cases this instance is returned. Normalisation is also performed automatically after all periods have been added. @pa...
[ "A", "convenience", "method", "that", "combines", "all", "the", "periods", "in", "the", "specified", "list", "to", "this", "list", ".", "The", "result", "returned", "is", "a", "new", "PeriodList", "instance", "except", "where", "no", "periods", "are", "speci...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/PeriodList.java#L215-L223
115,288
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/PeriodList.java
PeriodList.subtract
public final PeriodList subtract(final PeriodList subtractions) { if (subtractions == null || subtractions.isEmpty()) { return this; } PeriodList result = this; PeriodList tmpResult = new PeriodList(); for (final Period subtraction : subtractions) { ...
java
public final PeriodList subtract(final PeriodList subtractions) { if (subtractions == null || subtractions.isEmpty()) { return this; } PeriodList result = this; PeriodList tmpResult = new PeriodList(); for (final Period subtraction : subtractions) { ...
[ "public", "final", "PeriodList", "subtract", "(", "final", "PeriodList", "subtractions", ")", "{", "if", "(", "subtractions", "==", "null", "||", "subtractions", ".", "isEmpty", "(", ")", ")", "{", "return", "this", ";", "}", "PeriodList", "result", "=", "...
Subtracts the intersection of this list with the specified list of periods from this list and returns the results as a new period list. If no intersection is identified this list is returned. @param subtractions a list of periods to subtract from this list @return a period list
[ "Subtracts", "the", "intersection", "of", "this", "list", "with", "the", "specified", "list", "of", "periods", "from", "this", "list", "and", "returns", "the", "results", "as", "a", "new", "period", "list", ".", "If", "no", "intersection", "is", "identified"...
7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/PeriodList.java#L234-L251
115,289
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/FileUtil.java
FileUtil.getFileFilter
public static FileFilter getFileFilter() { return new FileFilter() { @Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with registered extension //or if a non-hidden and not-ignored directory return !...
java
public static FileFilter getFileFilter() { return new FileFilter() { @Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with registered extension //or if a non-hidden and not-ignored directory return !...
[ "public", "static", "FileFilter", "getFileFilter", "(", ")", "{", "return", "new", "FileFilter", "(", ")", "{", "@", "Override", "public", "boolean", "accept", "(", "File", "pathname", ")", "{", "//Accept if input is a non-hidden file with registered extension", "//o...
Filters files based on their file extension. @return Object for filtering files
[ "Filters", "files", "based", "on", "their", "file", "extension", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/FileUtil.java#L31-L42
115,290
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/FileUtil.java
FileUtil.getRunningLocation
public static File getRunningLocation() throws Exception { String codePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getPath(); String decodedPath = URLDecoder.decode(codePath, "UTF-8"); File codeFile = new File(decodedPath); if (!codeFile.exists()) { ...
java
public static File getRunningLocation() throws Exception { String codePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getPath(); String decodedPath = URLDecoder.decode(codePath, "UTF-8"); File codeFile = new File(decodedPath); if (!codeFile.exists()) { ...
[ "public", "static", "File", "getRunningLocation", "(", ")", "throws", "Exception", "{", "String", "codePath", "=", "FileUtil", ".", "class", ".", "getProtectionDomain", "(", ")", ".", "getCodeSource", "(", ")", ".", "getLocation", "(", ")", ".", "getPath", "...
Works out the folder where JBake is running from. @return File referencing folder JBake is running from @throws Exception when application is not able to work out where is JBake running from
[ "Works", "out", "the", "folder", "where", "JBake", "is", "running", "from", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/FileUtil.java#L95-L108
115,291
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/FileUtil.java
FileUtil.sha1
public static String sha1(File sourceFile) throws Exception { byte[] buffer = new byte[1024]; MessageDigest complete = MessageDigest.getInstance("SHA-1"); updateDigest(complete, sourceFile, buffer); byte[] bytes = complete.digest(); StringBuilder sb = new StringBuilder(); ...
java
public static String sha1(File sourceFile) throws Exception { byte[] buffer = new byte[1024]; MessageDigest complete = MessageDigest.getInstance("SHA-1"); updateDigest(complete, sourceFile, buffer); byte[] bytes = complete.digest(); StringBuilder sb = new StringBuilder(); ...
[ "public", "static", "String", "sha1", "(", "File", "sourceFile", ")", "throws", "Exception", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "1024", "]", ";", "MessageDigest", "complete", "=", "MessageDigest", ".", "getInstance", "(", "\"SHA-1\"", ...
Computes the hash of a file or directory. @param sourceFile the original file or directory @return an hex string representing the SHA1 hash of the file or directory. @throws Exception if any IOException of SecurityException occured
[ "Computes", "the", "hash", "of", "a", "file", "or", "directory", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/FileUtil.java#L131-L141
115,292
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/FileUtil.java
FileUtil.isFileInDirectory
public static boolean isFileInDirectory(File file, File directory) throws IOException { return (file.exists() && !file.isHidden() && directory.isDirectory() && file.getCanonicalPath().startsWith(directory.getCanonicalPath())); }
java
public static boolean isFileInDirectory(File file, File directory) throws IOException { return (file.exists() && !file.isHidden() && directory.isDirectory() && file.getCanonicalPath().startsWith(directory.getCanonicalPath())); }
[ "public", "static", "boolean", "isFileInDirectory", "(", "File", "file", ",", "File", "directory", ")", "throws", "IOException", "{", "return", "(", "file", ".", "exists", "(", ")", "&&", "!", "file", ".", "isHidden", "(", ")", "&&", "directory", ".", "i...
Utility method to determine if a given file is located somewhere in the directory provided. @param file used to check if it is located in the provided directory. @param directory to validate whether or not the provided file resides. @return true if the file is somewhere in the provided directory, false if it is not. @...
[ "Utility", "method", "to", "determine", "if", "a", "given", "file", "is", "located", "somewhere", "in", "the", "directory", "provided", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/FileUtil.java#L241-L246
115,293
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Crawler.java
Crawler.crawl
private void crawl(File path) { File[] contents = path.listFiles(FileUtil.getFileFilter()); if (contents != null) { Arrays.sort(contents); for (File sourceFile : contents) { if (sourceFile.isFile()) { StringBuilder sb = new StringBuilder(); ...
java
private void crawl(File path) { File[] contents = path.listFiles(FileUtil.getFileFilter()); if (contents != null) { Arrays.sort(contents); for (File sourceFile : contents) { if (sourceFile.isFile()) { StringBuilder sb = new StringBuilder(); ...
[ "private", "void", "crawl", "(", "File", "path", ")", "{", "File", "[", "]", "contents", "=", "path", ".", "listFiles", "(", "FileUtil", ".", "getFileFilter", "(", ")", ")", ";", "if", "(", "contents", "!=", "null", ")", "{", "Arrays", ".", "sort", ...
Crawl all files and folders looking for content. @param path Folder to start from
[ "Crawl", "all", "files", "and", "folders", "looking", "for", "content", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Crawler.java#L81-L120
115,294
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Crawler.java
Crawler.createUri
private String createUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + config.getOutputExtension(); } catch (UnsupportedE...
java
private String createUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + config.getOutputExtension(); } catch (UnsupportedE...
[ "private", "String", "createUri", "(", "String", "uri", ")", "{", "try", "{", "return", "FileUtil", ".", "URI_SEPARATOR_CHAR", "+", "FilenameUtils", ".", "getPath", "(", "uri", ")", "+", "URLEncoder", ".", "encode", "(", "FilenameUtils", ".", "getBaseName", ...
commons-codec's URLCodec could be used when we add that dependency.
[ "commons", "-", "codec", "s", "URLCodec", "could", "be", "used", "when", "we", "add", "that", "dependency", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Crawler.java#L153-L162
115,295
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Parser.java
Parser.processFile
public Map<String, Object> processFile(File file) { ParserEngine engine = Engines.get(FileUtil.fileExt(file)); if (engine==null) { LOGGER.error("Unable to find suitable markup engine for {}",file); return null; } return engine.parse(config, file); }
java
public Map<String, Object> processFile(File file) { ParserEngine engine = Engines.get(FileUtil.fileExt(file)); if (engine==null) { LOGGER.error("Unable to find suitable markup engine for {}",file); return null; } return engine.parse(config, file); }
[ "public", "Map", "<", "String", ",", "Object", ">", "processFile", "(", "File", "file", ")", "{", "ParserEngine", "engine", "=", "Engines", ".", "get", "(", "FileUtil", ".", "fileExt", "(", "file", ")", ")", ";", "if", "(", "engine", "==", "null", ")...
Process the file by parsing the contents. @param file File input for parsing @return The contents of the file
[ "Process", "the", "file", "by", "parsing", "the", "contents", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Parser.java#L37-L45
115,296
jbake-org/jbake
jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java
MarkupEngine.parse
public Map<String, Object> parse(JBakeConfiguration config, File file) { this.configuration = config; List<String> fileContents; try (InputStream is = new FileInputStream(file)) { fileContents = IOUtils.readLines(is, config.getRenderEncoding()); } catch (IOException e) { ...
java
public Map<String, Object> parse(JBakeConfiguration config, File file) { this.configuration = config; List<String> fileContents; try (InputStream is = new FileInputStream(file)) { fileContents = IOUtils.readLines(is, config.getRenderEncoding()); } catch (IOException e) { ...
[ "public", "Map", "<", "String", ",", "Object", ">", "parse", "(", "JBakeConfiguration", "config", ",", "File", "file", ")", "{", "this", ".", "configuration", "=", "config", ";", "List", "<", "String", ">", "fileContents", ";", "try", "(", "InputStream", ...
Parse given file to extract as much infos as possible @param file file to process @return a map containing all infos. Returning null indicates an error, even if an exception would be better.
[ "Parse", "given", "file", "to", "extract", "as", "much", "infos", "as", "possible" ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java#L77-L126
115,297
jbake-org/jbake
jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java
MarkupEngine.hasHeader
private boolean hasHeader(List<String> contents) { boolean headerValid = true; boolean statusFound = false; boolean typeFound = false; if (!headerSeparatorDemarcatesHeader(contents)) { return false; } for (String line : contents) { if (hasHeaderS...
java
private boolean hasHeader(List<String> contents) { boolean headerValid = true; boolean statusFound = false; boolean typeFound = false; if (!headerSeparatorDemarcatesHeader(contents)) { return false; } for (String line : contents) { if (hasHeaderS...
[ "private", "boolean", "hasHeader", "(", "List", "<", "String", ">", "contents", ")", "{", "boolean", "headerValid", "=", "true", ";", "boolean", "statusFound", "=", "false", ";", "boolean", "typeFound", "=", "false", ";", "if", "(", "!", "headerSeparatorDema...
Checks if the file has a meta-data header. @param contents Contents of file @return true if header exists, false if not
[ "Checks", "if", "the", "file", "has", "a", "meta", "-", "data", "header", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java#L165-L194
115,298
jbake-org/jbake
jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java
MarkupEngine.headerSeparatorDemarcatesHeader
private boolean headerSeparatorDemarcatesHeader(List<String> contents) { List<String> subContents = null; int index = contents.indexOf(configuration.getHeaderSeparator()); if (index != -1) { // get every line above header separator subContents = contents.subList(0, index)...
java
private boolean headerSeparatorDemarcatesHeader(List<String> contents) { List<String> subContents = null; int index = contents.indexOf(configuration.getHeaderSeparator()); if (index != -1) { // get every line above header separator subContents = contents.subList(0, index)...
[ "private", "boolean", "headerSeparatorDemarcatesHeader", "(", "List", "<", "String", ">", "contents", ")", "{", "List", "<", "String", ">", "subContents", "=", "null", ";", "int", "index", "=", "contents", ".", "indexOf", "(", "configuration", ".", "getHeaderS...
Checks if header separator demarcates end of metadata header @param contents @return true if header separator resides at end of metadata header, false if not
[ "Checks", "if", "header", "separator", "demarcates", "end", "of", "metadata", "header" ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java#L214-L231
115,299
jbake-org/jbake
jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java
MarkupEngine.processDefaultHeader
private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }
java
private void processDefaultHeader(ParserContext context) { for (String line : context.getFileLines()) { if (hasHeaderSeparator(line)) { break; } processHeaderLine(line, context.getDocumentModel()); } }
[ "private", "void", "processDefaultHeader", "(", "ParserContext", "context", ")", "{", "for", "(", "String", "line", ":", "context", ".", "getFileLines", "(", ")", ")", "{", "if", "(", "hasHeaderSeparator", "(", "line", ")", ")", "{", "break", ";", "}", "...
Process the header of the file. @param context the parser context
[ "Process", "the", "header", "of", "the", "file", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java#L250-L258