Package org.cip4.jdflib.datatypes
Class JDFNumberList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<Object>
org.cip4.jdflib.datatypes.JDFNumList
org.cip4.jdflib.datatypes.JDFNumberList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,JDFBaseDataTypes
This class is a representation of a number list (JDFNumberList). It is a whitespace separated list of double values.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cip4.jdflib.datatypes.JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparatorNested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes
JDFBaseDataTypes.EnumFitsValue -
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractList
modCountFields 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
ConstructorsConstructorDescriptionJDFNumberList(double[] array) constructs a number list with the given stringDeprecated.use typesafe constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x) add - add a double value to the vectorvoidadd - adds a number list to the already existing number listbooleancontains(double d) return true if at least one value in the list is dstatic JDFNumberListfactory for JDFNumberList that silently returns null in case of illegal stringsbooleanisValid()isValid - true if all instances are Double typesMethods 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, volumeMethods 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, trimToSizeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Constructor Details
-
JDFNumberList
public JDFNumberList(double[] array) -
JDFNumberList
- Throws:
DataFormatException
-
JDFNumberList
public JDFNumberList() -
JDFNumberList
constructs a number list with the given string- Parameters:
s- the given String- Throws:
DataFormatException- - if the String has not a valid format
-
JDFNumberList
Deprecated.use typesafe constructorsconstructs a number list with the given vector- Parameters:
v- the given vector- Throws:
DataFormatException- - if the Vector has not a valid format
-
-
Method Details
-
createNumberList
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
isValid - true if all instances are Double types- Specified by:
isValidin classJDFNumList- Returns:
- boolean - true if all instances are Double or Integer types
- Throws:
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
add - adds a number list to the already existing number list- Parameters:
s- the given string- Throws:
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:
-