Class JDFRangeList

    • Field Detail

      • rangeList

        protected java.util.ArrayList<JDFRange> rangeList
    • Constructor Detail

      • JDFRangeList

        public JDFRangeList()
        constructor
    • Method Detail

      • elementAt

        public final java.lang.Object elementAt​(int i)
        getElementAt - returns the element at the ith position
        Parameters:
        i - the position of the element to be retrieved
        Returns:
        Object - the range object at the given position
      • remove

        public final void remove​(int i)
        remove - removes an object from the vector
        Parameters:
        i - the index of the element to remove
      • isPartOfRange

        public final boolean isPartOfRange​(JDFRange x)
        isPartOfRange - check whether range 'x' is in the range defined by 'this'
        Parameters:
        x - JDFRange to test
        Returns:
        boolean - true if 'x' is in the range defined by 'this'
      • isPartOfRange

        public final boolean isPartOfRange​(JDFRangeList x)
        isPartOfRange - check whether JDFRangeList 'x' is within this range list
        Parameters:
        x - the range list to test
        Returns:
        boolean - true if range list 'x' is within 'this' range list, else false
      • getString

        @Deprecated
        public final java.lang.String getString()
        Deprecated.
        060418 use toString
        getString - serialize to string
        Returns:
        String - a list of ranges in the format PT30M30S~PT35M (duration (JDFDate) has a format=P1Y2M3DT12H30M30S)
      • toString

        public final java.lang.String toString()
        toString - serialize to string
        Overrides:
        toString in class java.lang.Object
        Returns:
        String - a list of ranges in the format a ~ b
      • getString

        public final java.lang.String getString​(int precision)
        toString - serialize to string
        Returns:
        String - a list of ranges in the format a ~ b
      • size

        public final int size()
        number of Duration range elements
        Returns:
        int - the number of Duration ranges in the list
      • clear

        public final void clear()
        cleanup and empty the internal storge
      • at

        public final JDFRange at​(int i)
        at(i) - get the i-th range element
        Parameters:
        i - index of the range to retrieve
        Returns:
        JDFRange - JDFDateTimeRange at the position i
      • begin

        public final JDFRange begin()
        begin() - returns the first JDFDateTimeRange of the JDFDateTimeRangeList
        Returns:
        JDFRange: the first JDFDateTimeRange of the JDFDateTimeRangeList
      • end

        public final JDFRange end()
        begin() - returns the last JDFDateTimeRange of the JDFDateTimeRangeList
        Returns:
        JDFRange: the last JDFDateTimeRange of the JDFDateTimeRangeList
      • erase

        public final void erase​(int i)
        erase(i) - Removes the i-th element of the range list
        Parameters:
        i - index of element (range) to remove
      • isList

        public final boolean isList()
        isList - tests if 'this' is a List
        Returns:
        boolean - true if 'this' contains no ranges
      • equals

        public final boolean equals​(java.lang.Object other)
        equals - returns true if both JDFNumberRangeList are equal otherwise false
        Overrides:
        equals in class java.lang.Object
        Returns:
        boolean - true if equal otherwise false
      • hashCode

        public final int hashCode()
        hashCode complements equals() to fulfill the equals/hashCode contract
        Overrides:
        hashCode in class java.lang.Object
      • isUniqueOrdered

        public abstract boolean isUniqueOrdered()
        isUniqueOrdered - tests if this has only unique values and if the values are ordered
        Returns:
        true if values are unique and ordered, otherwise false
      • isUnique

        public final boolean isUnique()
        isUnique - tests if 'this' has only unique values
        Returns:
        boolean: true if 'this' is a unique range list
      • isOrdered

        public abstract boolean isOrdered()