|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<Object>
org.cip4.jdflib.datatypes.JDFNumList
org.cip4.jdflib.datatypes.JDFIntegerList
public class JDFIntegerList
This class is a representation of an integer list (JDFIntegerList). It is a whitespace separated list of integer values.
| 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 | |
|---|---|
JDFIntegerList()
constructs an empty range list |
|
JDFIntegerList(int i)
constructs an integer list with all values set via an int |
|
JDFIntegerList(int[] iArray)
constructs an integer list with all values set via an int[] |
|
JDFIntegerList(JDFIntegerList il)
constructs an integer list with all values set via a JDFIntegerList |
|
JDFIntegerList(String s)
constructs an integer list with all values set via a String |
|
| Method Summary | |
|---|---|
JDFNumList |
abs()
modify numlist to absolute values |
void |
add(int x)
add - add an int to the vector |
void |
add(JDFIntegerList il)
Deprecated. - usa addAll |
void |
add(String s)
add - adds a integer list string to the existing integer list |
void |
addIntegerList(JDFIntegerList il)
Deprecated. - use addAll() |
boolean |
contains(int d)
return true if at least one value in the list is d |
static JDFIntegerList |
createIntegerList(String s)
convert a string to an integerlist, and return null if the string is no good |
boolean |
equals(Object other)
equals - returns true if both JDFIntegerList are equal otherwise false |
int |
getInt(int pos)
getInt - returns the integer at 'pos' from the list. |
int[] |
getIntArray()
getIntArray - returns this integer list as an int array |
static JDFIntegerList |
getIntegerList(String s)
Deprecated. use createIntegerList |
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract |
boolean |
isValid()
isValid - true if all instances are Integer types |
boolean |
isValidString(String st)
isValidString - true if all instances are Double or Integer types |
JDFIntegerList |
scale(double factor)
must keep this because otherwise the object vector gets corrupted with Double objects |
void |
setInt(int i)
setIntArray - sets this integer list to an int the RangeList is emptied, then the single value i is added |
void |
setInt(int pos,
int val)
setInt - sets the integer val at 'pos' from the list. |
void |
setIntArray(int[] iArray)
setIntArray - sets this integer list to an int array the RangeList is emptied, then the values of iArray are added |
void |
subtract(JDFNumList l)
subtract l from this, |
| Methods inherited from class org.cip4.jdflib.datatypes.JDFNumList |
|---|
clone, contains, containsAll, copyNumList, doubleAt, elementAt, getDoubleList, getString, getString, matches, removeElementAt, replaceElementAt, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, setString, 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 |
|---|
public JDFIntegerList()
public JDFIntegerList(String s)
throws DataFormatException
s - the given String
DataFormatException - - if the String has not a valid format
public JDFIntegerList(JDFIntegerList il)
throws DataFormatException
il - the given integer list
DataFormatException - - if the JDFIntegerList has not a valid formatpublic JDFIntegerList(int[] iArray)
iArray - - the given integer arraypublic JDFIntegerList(int i)
i - the given integer| Method Detail |
|---|
public boolean isValidString(String st)
JDFNumList
isValidString in class JDFNumListst -
JDFNumList.isValidString(java.lang.String)@Deprecated public static JDFIntegerList getIntegerList(String s)
s - the string to parse
public static JDFIntegerList createIntegerList(String s)
s - the string to parse
public boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic boolean contains(int d)
d - the value to search
public boolean equals(Object other)
equals in interface Collection<Object>equals in interface List<Object>equals in class JDFNumListpublic int hashCode()
hashCode in interface Collection<Object>hashCode in interface List<Object>hashCode in class JDFNumList@Deprecated public void addIntegerList(JDFIntegerList il)
il - the given integer listpublic void add(int x)
x - the int value@Deprecated public void add(JDFIntegerList il)
il - the given integer list
public void add(String s)
throws DataFormatException
s - the given string
DataFormatException - - if the String has not a valid formatpublic int getInt(int pos)
pos - index of the integer to get
public void setInt(int pos,
int val)
pos - index of the integer to getval - the value to setpublic JDFIntegerList scale(double factor)
scale in class JDFNumListJDFNumList.scale(double)public int[] getIntArray()
getIntArray in class JDFNumListpublic void setIntArray(int[] iArray)
iArray - the int arraypublic void setInt(int i)
i - the valuepublic JDFNumList abs()
JDFNumList
abs in class JDFNumListJDFNumList.abs()public void subtract(JDFNumList l)
subtract in class JDFNumListl - the list to subtract from this
IllegalArgumentException - if sizes don't match
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||