Class JDFDurationRangeList

    • Constructor Detail

      • JDFDurationRangeList

        public JDFDurationRangeList()
        empty constructor
      • JDFDurationRangeList

        public JDFDurationRangeList​(java.lang.String s)
                             throws java.util.zip.DataFormatException
        constructs a JDFDurationRangeList from a given string
        Parameters:
        s - the given string
        Throws:
        java.util.zip.DataFormatException - - if the String has not a valid format
      • JDFDurationRangeList

        public JDFDurationRangeList​(JDFDurationRangeList rl)
        constructs a JDFDurationRangeList from the given JDFDurationRangeList
        Parameters:
        rl - the given JDFDurationRangeList
    • Method Detail

      • createDurationRangeList

        public static JDFDurationRangeList createDurationRangeList​(java.lang.String s)
        factory for JDFDurationRangeList that silently returns null in case of illegal strings
        Parameters:
        s - the string to parse
        Returns:
        the JDFDurationRangeList, null if s is not compatible
      • inRange

        public boolean inRange​(JDFDuration x)
        inRange - returns true if the given JDFDuration value is in one of the ranges of the range list
        Parameters:
        x - the given JDFDuration (duration) value to compare
        Returns:
        boolean - true if in range otherwise false
      • setString

        public void setString​(java.lang.String s)
                       throws java.util.zip.DataFormatException
        setString - parse the given string and set the duration range list
        Parameters:
        s - the given string
        Throws:
        java.util.zip.DataFormatException - - if the String has not a valid format
      • isValid

        public boolean isValid​(java.lang.String s)
        isValid - validate the given String
        Parameters:
        s - the given string
        Returns:
        boolean - false if the String has not a valid format
      • append

        public void append​(JDFDurationRange r)
        add a duration range r =rMin~rMax
        Parameters:
        r - the Duration range to append to the list
      • append

        public void append​(JDFDuration xMin,
                           JDFDuration xMax)
        add a duration range defined by two dates xMin~xMax
        Parameters:
        xMin - the left value of the Duration range to append to the list
        xMax - the right value of the Duration range to append to the list
      • append

        public void append​(JDFDuration x)
        add an individual JDFDuration element
        Parameters:
        x - the left and right value of the Duration range to append to the list
      • isOrdered

        public boolean isOrdered()
        isOrdered - tests if 'this' is OrderedRangeList
        Specified by:
        isOrdered in class JDFRangeList
        Returns:
        boolean - true if 'this' is a OrdneredRangeList
      • getOrderedArray

        protected java.util.ArrayList<JDFDuration> getOrderedArray()
      • isUniqueOrdered

        public boolean isUniqueOrdered()
        isUniqueOrdered - tests if 'this' is UniqueOrdered RangeList
        Specified by:
        isUniqueOrdered in class JDFRangeList
        Returns:
        boolean - true if 'this' is UniqueOrdered RangeList