Class Component

    • Constructor Detail

      • Component

        protected Component​(String s)
        Constructs a new component containing no properties.
        s - a component name
      • Component

        protected Component​(String s,
                            PropertyList p,
                            ComponentList<? extends Component> c)
        Constructor made protected to enforce the use of ComponentFactory for component instantiation.
        s - component name
        p - a list of properties
    • Method Detail

      • getName

        public final String getName()
        Specified by:
        getName in class Content
        Returns the name.
      • getValue

        public String getValue()
        Specified by:
        getValue in class Content
        the content value
      • getProperties

        public <T extends PropertyList<T> getProperties()
      • validate

        public abstract ValidationResult validate​(boolean recurse)
                                           throws ValidationException
        Perform validation on a component.
        recurse - indicates whether to validate the component's properties
        ValidationException - where the component is not in a valid state
      • hashCode

        public int hashCode()
        hashCode in class Object
      • newFactory

        protected abstract ComponentFactory<? extends Component> newFactory()
        Returns a new component factory used to create deep copies.
        a component factory instance
      • copy

        public <T extends Component> T copy()
        Create a (deep) copy of this component.
        the component copy
      • calculateRecurrenceSet

        public final <T extends TemporalSet<Period<T>> calculateRecurrenceSet​(Period<T> period)
        Calculates the recurrence set for this component using the specified period. The recurrence set is derived from a combination of the component start date, recurrence rules and dates, and exception rules and dates. Note that component transparency and anniversary-style dates do not affect the resulting intersection.

        If an explicit DURATION is not specified, the effective duration of each returned period is derived from the DTSTART and DTEND or DUE properties. If the component has no DURATION, DTEND or DUE, the effective duration is set to PT0S

        NOTE: As a component may be defined in terms of floating date-time values (i.e. without a specific timezone), when calculating a recurrence set we must explicitly provide an applicable timezone for calculations.
        period - a range that defines the boundary for calculations
        a list of periods representing component occurrences within the specified boundary