/** * Convenience method for retrieving a named component. * @param name name of the component to retrieve * @return the first matching component in the component list with the specified name */ public final CalendarComponent getComponent(final String name) { return getComponents().getComponent(name); }
/** * @param componentName a component name used in the assertion * @param components a list of components * @throws ValidationException where the assertion fails */ public static void assertNone(String componentName, ComponentList<?> components) throws ValidationException { if (components.getComponent(componentName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName}); } }
/** * Convenience method for retrieving a named component. * @param name name of the component to retrieve * @return the first matching component in the component list with the specified name */ public final CalendarComponent getComponent(final String name) { return getComponents().getComponent(name); }
/** * @param componentName a component name used in the assertion * @param components a list of components * @throws ValidationException where the assertion fails */ public static void assertNone(String componentName, ComponentList<?> components) throws ValidationException { if (components.getComponent(componentName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName}); } }
/** * @param componentName a component name used in the assertion * @param components a list of components * @throws ValidationException where the assertion fails */ public static void assertNone(String componentName, ComponentList components) throws ValidationException { if (components.getComponent(componentName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName}); } }
/** * Returns the first event in the Calendar * * @param calendar Calendar containing Events * @return VEvent Object representing the first event, else null if not present. */ public static VEvent getFirstEvent(net.fortuna.ical4j.model.Calendar calendar){ return (VEvent) calendar.getComponents().getComponent(Component.VEVENT); }
/** * Convenience method for retrieving a named component. * @param name name of the component to retrieve * @return the first matching component in the component list with the specified name */ public final CalendarComponent getComponent(final String name) { return getComponents().getComponent(name); }
/** * @param componentName a component name used in the assertion * @param components a list of components * @throws ValidationException where the assertion fails */ public static void assertNone(String componentName, ComponentList<?> components) throws ValidationException { if (components.getComponent(componentName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName}); } }
/** * Convenience method for retrieving a named component. * @param name name of the component to retrieve * @return the first matching component in the component list with the specified name */ public final Component getComponent(final String name) { return getComponents().getComponent(name); }
/** * Convenience method for retrieving a named component. * @param name name of the component to retrieve * @return the first matching component in the component list with the specified name */ public final CalendarComponent getComponent(final String name) { return getComponents().getComponent(name); }
/** * @param componentName a component name used in the assertion * @param components a list of components * @throws ValidationException where the assertion fails */ public static void assertNone(String componentName, ComponentList<?> components) throws ValidationException { if (components.getComponent(componentName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName}); } }
public TimeZone getTimezone() { Calendar timezone = getTimezoneCalendar(); if (timezone == null) { return null; } VTimeZone vtz = (VTimeZone) timezone.getComponents().getComponent(Component.VTIMEZONE); return new TimeZone(vtz); }
/** * @return The default timezone for this calendar collection, if one has been set. */ public VTimeZone getTimeZone() { Calendar obj = getCalendarCollectionStamp().getTimezoneCalendar(); if (obj == null) { return null; } return (VTimeZone) obj.getComponents().getComponent(Component.VTIMEZONE); }
public TimeZone getTimezone() { Calendar timezone = getTimezoneCalendar(); if (timezone == null) { return null; } VTimeZone vtz = (VTimeZone) timezone.getComponents().getComponent(Component.VTIMEZONE); return new TimeZone(vtz); }
/** * @return The default timezone for this calendar collection, if one has been set. */ public VTimeZone getTimeZone() { Calendar obj = getCalendarCollectionStamp().getTimezoneCalendar(); if (obj == null) { return null; } return (VTimeZone) obj.getComponents().getComponent(Component.VTIMEZONE); }
public String getTimezoneName() { Calendar timezone = getTimezoneCalendar(); if (timezone == null) { return null; } return timezone.getComponents().getComponent(Component.VTIMEZONE). getProperties().getProperty(Property.TZID).getValue(); }
public String getTimezoneName() { Calendar timezone = getTimezoneCalendar(); if (timezone == null) { return null; } return timezone.getComponents().getComponent(Component.VTIMEZONE). getProperties().getProperty(Property.TZID).getValue(); }
if (getObservances().getComponent(Observance.STANDARD) == null && getObservances().getComponent(Observance.DAYLIGHT) == null) { throw new ValidationException("Sub-components [" + Observance.STANDARD + "," + Observance.DAYLIGHT
if (getObservances().getComponent(Observance.STANDARD) == null && getObservances().getComponent(Observance.DAYLIGHT) == null) { throw new ValidationException("Sub-components [" + Observance.STANDARD + "," + Observance.DAYLIGHT
if (getObservances().getComponent(Observance.STANDARD) == null && getObservances().getComponent(Observance.DAYLIGHT) == null) { throw new ValidationException("Sub-components [" + Observance.STANDARD + "," + Observance.DAYLIGHT