Package org.cip4.jdflib.datatypes
Class JDFRectangleRangeList
- java.lang.Object
-
- org.cip4.jdflib.datatypes.JDFRangeList
-
- org.cip4.jdflib.datatypes.JDFRectangleRangeList
-
- All Implemented Interfaces:
JDFBaseDataTypes
public class JDFRectangleRangeList extends JDFRangeList
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes
JDFBaseDataTypes.EnumFitsValue
-
-
Field Summary
-
Fields inherited from class org.cip4.jdflib.datatypes.JDFRangeList
rangeList
-
Fields inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION
-
-
Constructor Summary
Constructors Constructor Description JDFRectangleRangeList()empty constructorJDFRectangleRangeList(java.lang.String s)constructs a JDFRectangleRangeList from a given stringJDFRectangleRangeList(JDFRectangleRangeList rl)copy constructor
constructs a JDFRectangleRangeList with the given JDFRectangleRangeList
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(JDFRectangle x)append - adds an individual JDFRectangle elementvoidappend(JDFRectangleRange x)append - adds an element defined by a JDFRectangleRangevoidappend(JDFRectangle xMin, JDFRectangle xMax)append - adds an element defined by two JDFRectangles xMin~xMaxstatic JDFRectangleRangeListcreateRectangleRangeList(java.lang.String s)factory for JDFRectangleRangeList that silently returns null in case of illegal stringsprotected java.util.ArrayList<JDFRectangle>getOrderedArray()booleaninRange(JDFRectangle x)inRange - check whether rectangle 'x' is in the rectangle range defined by 'this'booleanisOrdered()isOrdered - tests if 'this' is an OrderedRangeListbooleanisUniqueOrdered()isUniqueOrdered - tests if 'this' is an UniqueOrdered RangeListbooleanisValid(java.lang.String s)isValid - validate the given StringvoidsetString(java.lang.String s)setString - deserialize a string Reads the string, which represents JDFRectangleRangeList, and converts it into real JDFRectangleRangeList
-
-
-
Constructor Detail
-
JDFRectangleRangeList
public JDFRectangleRangeList()
empty constructor
-
JDFRectangleRangeList
public JDFRectangleRangeList(JDFRectangleRangeList rl)
copy constructor
constructs a JDFRectangleRangeList with the given JDFRectangleRangeList- Parameters:
rl-
-
JDFRectangleRangeList
public JDFRectangleRangeList(java.lang.String s) throws java.util.zip.DataFormatExceptionconstructs a JDFRectangleRangeList from a given string- Parameters:
s- the given string- Throws:
java.util.zip.DataFormatException- - if the String has not a valid format
-
-
Method Detail
-
createRectangleRangeList
public static JDFRectangleRangeList createRectangleRangeList(java.lang.String s)
factory for JDFRectangleRangeList that silently returns null in case of illegal strings- Parameters:
s- the string to parse- Returns:
- the JDFRectangleRangeList, null if s is not compatible
-
inRange
public boolean inRange(JDFRectangle x)
inRange - check whether rectangle 'x' is in the rectangle range defined by 'this'- Parameters:
x- rectangle 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.DataFormatExceptionsetString - deserialize a string Reads the string, which represents JDFRectangleRangeList, and converts it into real JDFRectangleRangeList- 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(JDFRectangleRange x)
append - adds an element defined by a JDFRectangleRange- Parameters:
x- the range to append to the list
-
append
public void append(JDFRectangle x)
append - adds an individual JDFRectangle element- Parameters:
x- the left and right value of the range to append to the list
-
append
public void append(JDFRectangle xMin, JDFRectangle xMax)
append - adds an element defined by two JDFRectangles xMin~xMax- Parameters:
xMin- the left value of the range to append to the listxMax- the right value of the range to append to the list
-
isOrdered
public boolean isOrdered()
isOrdered - tests if 'this' is an OrderedRangeList- Specified by:
isOrderedin classJDFRangeList- Returns:
- boolean - true if 'this' is a OrdneredRangeList
-
getOrderedArray
protected java.util.ArrayList<JDFRectangle> getOrderedArray()
-
isUniqueOrdered
public boolean isUniqueOrdered()
isUniqueOrdered - tests if 'this' is an UniqueOrdered RangeList- Specified by:
isUniqueOrderedin classJDFRangeList- Returns:
- boolean - true if 'this' is an UniqueOrdered RangeList
-
-