Class JDFShapeRangeList

    • Constructor Detail

      • JDFShapeRangeList

        public JDFShapeRangeList()
        empty constructor
      • JDFShapeRangeList

        public JDFShapeRangeList​(JDFShapeRangeList rl)
        copy constructor
        constructs a JDFShapeRangeList with the given JDFShapeRangeList
        Parameters:
        rl -
      • JDFShapeRangeList

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

      • createShapeRangeList

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

        public boolean inRange​(JDFShape x)
        inRange - check whether shape 'x' is in the shape range defined by 'this'
        Parameters:
        x - shape value to test
        Returns:
        boolean - true if 'x' is in the range defined by 'this'
      • setString

        public void setString​(java.lang.String s)
                       throws java.util.zip.DataFormatException
        setString - deserialize a string Reads the string, which represents JDFShapeRangeList, and converts it into real JDFShapeRangeList
        Parameters:
        s - string to read
        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​(JDFShapeRange x)
        append - adds an element defined by a JDFShapeRange
        Parameters:
        x - the range to append to the list
      • append

        public void append​(JDFShape x)
        append - adds an individual JDFShape element
        Parameters:
        x - the left and right value of the range to append to the list
      • append

        public void append​(JDFShape xMin,
                           JDFShape xMax)
        append - adds an element defined by two JDFShapes: xMin~xMax
        Parameters:
        xMin - the left value of the range to append to the list
        xMax - the right value of the 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<JDFShape> 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