public abstract class JDFNumList extends java.util.Vector<java.lang.Object> implements JDFBaseDataTypes, java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
JDFNumList.NormComparator |
static class |
JDFNumList.VolumeComparator |
JDFBaseDataTypes.EnumFitsValueEPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFNumList()
constructs an empty number list
|
JDFNumList(double[] array)
constructor - constructs a number list with the given size and sets all values set to 0.0 Double
|
JDFNumList(int size)
constructor - constructs a number list with the given size and sets all values set to 0.0 Double
|
JDFNumList(int[] array)
constructor - constructs a number list with the given size and sets all values set to 0.0 Double
|
JDFNumList(JDFNumList nl)
constructor - constructs a number list with a given JDFNumList
|
JDFNumList(java.lang.String sl)
constructor - constructs a number list with the given String; if the sub class is of type JDFIntegerList all object will be Integer in all other cases the object will be a Double
|
JDFNumList(java.util.Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
JDFNumList |
abs()
modify numlist to absolute values
|
JDFNumList |
clone() |
boolean |
contains(JDFNumList l)
return true if this contains at least one element from l
|
boolean |
containsAll(JDFNumList l)
return true if this contains all elements from l
|
java.util.Vector<java.lang.Object> |
copyNumList()
Deprecated.
use clone()
|
double |
doubleAt(int i)
getElementAt - returns the element at the ith position
|
java.lang.Object |
elementAt(int i)
getElementAt - returns the element at the ith position
|
boolean |
equals(java.lang.Object other)
equals - compares two JDFNumList elements
|
java.lang.Double |
getDouble(int i) |
double[] |
getDoubleList()
get the list of values as doubles
|
java.util.Vector<java.lang.Double> |
getDoubleVector()
get the list of values as doubles
|
int[] |
getIntArray()
getIntArray - returns this integer list as an int array
|
java.lang.String |
getString()
Deprecated.
060418 - use toString
|
java.lang.String |
getString(int precision)
getString - returns the JDFNumList as a String
|
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract
|
int |
intAt(int i)
getElementAt - returns the element at the ith position
|
abstract boolean |
isValid()
isValid - true if all instances are Double or Integer types
|
boolean |
isValidString(java.lang.String st)
isValidString - true if all instances are Double or Integer types
|
boolean |
matches(JDFNumList other,
double delta)
are all values within +/- delta?
|
double |
max()
return the absolute norm (sqrt of sum of values)
|
double |
min()
return the absolute norm (sqrt of sum of values)
|
double |
norm()
return the absolute norm (sqrt of sum of values)
|
void |
removeElementAt(int i)
removeElementAt - removes the element at the given position
|
boolean |
replaceElementAt(java.lang.Object obj,
int i)
replaceElementAt - replaces the element at the given position with the given object
|
JDFNumList |
scale(double factor)
scale all values of this by factor
|
JDFNumList |
scale(double factor,
int precision)
scale all values of this by factor
|
JDFNumList |
scaleFromCM()
scale all values of this to points from centimeters
|
JDFNumList |
scaleFromCM(int precision)
scale all values of this to points from centimeters
|
JDFNumList |
scaleFromMM()
scale all values of this to points from millimeters
|
JDFNumList |
scaleFromMM(int precision)
scale all values of this to points from millimeters
|
JDFNumList |
scaleToCM()
scale all values of this to points from centimeters
|
JDFNumList |
scaleToCM(int precision)
scale all values of this to points from centimeters
|
JDFNumList |
scaleToMM()
scale all values of this to points from millimeters
|
JDFNumList |
scaleToMM(int precision)
scale all values of this to points from millimeters
|
void |
set(int pos,
double d) |
JDFNumList |
setString(java.lang.String string)
sets this to the value specified in string
|
JDFNumList |
setX(int pos,
double d) |
JDFNumList |
shift(double x)
return the absolute norm (sqrt of sum of values)
|
void |
sort() |
JDFNumList |
subtract(JDFNumList l)
subtract l from this,
|
java.lang.String |
toString()
toString - returns the JDFNumList as a String
|
void |
unify()
ensure that each instance exists only once
|
double |
volume()
return the n dimensional volume (product of all values)
|
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, trimToSizepublic JDFNumList()
public JDFNumList(int size)
size - the given sizepublic JDFNumList(int[] array)
size - the given sizepublic JDFNumList(double[] array)
size - the given size@Deprecated
public JDFNumList(java.util.Vector v)
throws java.util.zip.DataFormatException
v - a vector with number list objectsjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic JDFNumList(java.lang.String sl)
throws java.util.zip.DataFormatException
sl - the given Stringjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFNumList(JDFNumList nl) throws java.util.zip.DataFormatException
nl - the given number listjava.util.zip.DataFormatException - - if the String has not a valid formatpublic void set(int pos,
double d)
pos - d - public JDFNumList setX(int pos, double d)
pos - d - public JDFNumList setString(java.lang.String string) throws java.util.zip.DataFormatException
string - java.util.zip.DataFormatException@Deprecated public java.lang.String getString()
public double[] getDoubleList()
public java.util.Vector<java.lang.Double> getDoubleVector()
public java.lang.String toString()
toString in class java.util.Vector<java.lang.Object>public java.lang.String getString(int precision)
precision - # of digits to printpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collection<java.lang.Object>equals in interface java.util.List<java.lang.Object>equals in class java.util.Vector<java.lang.Object>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Object>hashCode in interface java.util.List<java.lang.Object>hashCode in class java.util.Vector<java.lang.Object>public java.lang.Object elementAt(int i)
elementAt in class java.util.Vector<java.lang.Object>i - the indexpublic double doubleAt(int i)
i - the indexpublic int intAt(int i)
i - the index@Deprecated public java.util.Vector<java.lang.Object> copyNumList()
public void removeElementAt(int i)
removeElementAt in class java.util.Vector<java.lang.Object>i - the position from where to remove the elementpublic boolean replaceElementAt(java.lang.Object obj,
int i)
obj - the objecti - the given positionpublic abstract boolean isValid()
throws java.util.zip.DataFormatException
java.util.zip.DataFormatExceptionpublic boolean isValidString(java.lang.String st)
st - the string to checkpublic JDFNumList scaleFromMM()
public JDFNumList scaleFromMM(int precision)
public JDFNumList scaleFromCM()
public JDFNumList scaleFromCM(int precision)
public JDFNumList scaleToMM()
public JDFNumList scaleToMM(int precision)
public JDFNumList scaleToCM()
public JDFNumList scaleToCM(int precision)
public JDFNumList scale(double factor)
factor - public JDFNumList scale(double factor, int precision)
factor - public JDFNumList abs()
Math.abs(int)public JDFNumList clone()
clone in class java.util.Vector<java.lang.Object>Vector.clone()public boolean matches(JDFNumList other, double delta)
other - delta - Math.abs(int)public JDFNumList subtract(JDFNumList l)
l - the list to subtract from thisjava.lang.IllegalArgumentException - if sizes don't matchpublic void unify()
public int[] getIntArray()
public java.lang.Double getDouble(int i)
i - public void sort()
public boolean contains(JDFNumList l)
l - the list to check forpublic double norm()
public double min()
public JDFNumList shift(double x)
public double max()
public double volume()
public boolean containsAll(JDFNumList l)
l - the list to check for