org.cip4.jdflib.datatypes
Class JDFNumberList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<Object>
              extended by org.cip4.jdflib.datatypes.JDFNumList
                  extended by org.cip4.jdflib.datatypes.JDFNumberList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, 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 interface org.cip4.jdflib.datatypes.JDFBaseDataTypes
JDFBaseDataTypes.EnumFitsValue
 
Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
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
JDFNumberList(String s)
          constructs a number list with the given string
JDFNumberList(Vector v)
          Deprecated. use typesafe constructors
 
Method Summary
 void add(double x)
          add - add a double value to the vector
 void add(String s)
          add - adds a number list to the already existing number list
 boolean contains(double d)
          return true if at least one value in the list is d
static JDFNumberList createNumberList(String s)
          factory for JDFNumberList that silently returns null in case of illegal strings
 boolean isValid()
          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, getDoubleList, getIntArray, getString, getString, hashCode, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, setString, subtract, toString, unify
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

JDFNumberList

public JDFNumberList(String s)
              throws DataFormatException
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
public JDFNumberList(Vector v)
              throws DataFormatException
Deprecated. use typesafe constructors

constructs a number list with the given vector

Parameters:
v - the given vector
Throws:
DataFormatException - - if the Vector has not a valid format
Method Detail

createNumberList

public static JDFNumberList createNumberList(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 DataFormatException
isValid - true if all instances are Double types

Specified by:
isValid in class JDFNumList
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

public void add(String s)
         throws DataFormatException
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:


Copyright © 2013. All Rights Reserved.