Package org.cip4.jdflib.datatypes
Class JDFNumberList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<java.lang.Object>
-
- org.cip4.jdflib.datatypes.JDFNumList
-
- org.cip4.jdflib.datatypes.JDFNumberList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<java.lang.Object>,java.util.Collection<java.lang.Object>,java.util.List<java.lang.Object>,java.util.RandomAccess,JDFBaseDataTypes
public class JDFNumberList extends JDFNumList
This class is a representation of a number list (JDFNumberList). It is a whitespace separated list of double values.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cip4.jdflib.datatypes.JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparator
-
Nested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes
JDFBaseDataTypes.EnumFitsValue
-
-
Field Summary
-
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 JDFNumberList()JDFNumberList(double[] array)JDFNumberList(java.lang.String s)constructs a number list with the given stringJDFNumberList(java.util.Vector v)Deprecated.use typesafe constructorsJDFNumberList(JDFNumList nl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double x)add - add a double value to the vectorvoidadd(java.lang.String s)add - adds a number list to the already existing number listbooleancontains(double d)return true if at least one value in the list is dstatic JDFNumberListcreateNumberList(java.lang.String s)factory for JDFNumberList that silently returns null in case of illegal stringsbooleanisValid()isValid - true if all instances are Double types-
Methods inherited from class org.cip4.jdflib.datatypes.JDFNumList
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDouble, getDoubleList, getDoubleVector, getIntArray, getString, getString, hashCode, intAt, isValidString, matches, max, min, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setString, setX, shift, sort, subtract, toString, unify, volume
-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
JDFNumberList
public JDFNumberList(double[] array)
-
JDFNumberList
public JDFNumberList(JDFNumList nl) throws java.util.zip.DataFormatException
- Throws:
java.util.zip.DataFormatException
-
JDFNumberList
public JDFNumberList()
-
JDFNumberList
public JDFNumberList(java.lang.String s) throws java.util.zip.DataFormatExceptionconstructs a number list with the given string- Parameters:
s- the given String- Throws:
java.util.zip.DataFormatException- - if the String has not a valid format
-
JDFNumberList
@Deprecated public JDFNumberList(java.util.Vector v) throws java.util.zip.DataFormatExceptionDeprecated.use typesafe constructorsconstructs a number list with the given vector- Parameters:
v- the given vector- Throws:
java.util.zip.DataFormatException- - if the Vector has not a valid format
-
-
Method Detail
-
createNumberList
public static JDFNumberList createNumberList(java.lang.String s)
factory for JDFNumberList that silently returns null in case of illegal strings- Parameters:
s- the string to parse- Returns:
- the JDFNumberList, null if s is not compatible
-
isValid
public boolean isValid() throws java.util.zip.DataFormatExceptionisValid - true if all instances are Double types- Specified by:
isValidin classJDFNumList- Returns:
- boolean - true if all instances are Double or Integer types
- Throws:
java.util.zip.DataFormatException- - if the Vector has not a valid format
-
add
public void add(double x)
add - add a double value to the vector- Parameters:
x- the double value
-
add
public void add(java.lang.String s) throws java.util.zip.DataFormatExceptionadd - adds a number list to the already existing number list- Parameters:
s- the given string- Throws:
java.util.zip.DataFormatException- - if the String has not a valid format
-
contains
public boolean contains(double d)
return true if at least one value in the list is d- Parameters:
d- the value to search- Returns:
-
-