public class JDFXYPair extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparator
JDFBaseDataTypes.EnumFitsValue
capacityIncrement, elementCount, elementData
modCount
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION
Constructor and Description |
---|
JDFXYPair()
constructs a xy pair with all values set to 0.0 Double
|
JDFXYPair(double x,
double y)
constructs a new JDFXYPair with the given double values
|
JDFXYPair(JDFNumList nl)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(JDFShape shape)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(JDFXYPair nl)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(String s)
constructs a xy pair with all values set via a String
if a single numerical value is specified, s is padded with " 0"
|
JDFXYPair(Vector v)
Deprecated.
use typesafe constructors
|
Modifier and Type | Method and Description |
---|---|
static JDFXYPair |
createXYPair(String s)
factory for JDFXYPair that silently returns null in case of illegal strings
|
double |
getX()
getX - returns the x coordinate
|
double |
getY()
getY - returns the y coordinate
|
boolean |
isGreater(JDFXYPair x)
isGreater - equality operator >
|
boolean |
isGreaterOrEqual(JDFXYPair x)
isGreaterOrEqual - equality operator >=
|
boolean |
isLess(JDFXYPair x)
isLess - equality operator <
|
boolean |
isLessOrEqual(JDFXYPair x)
isLessOrEqual - equality operator <=
|
boolean |
isPortrait()
return true if y is > x
|
boolean |
isValid()
isValid - valid if the size of the vector is 2 and all instances are Double types
|
void |
setString(String string)
setString with some heuristics to allow for a single numerical or values like "i/j"
|
void |
setX(double x)
setX - sets the x coordinate
|
void |
setY(double y)
setY - sets the y coordinate
|
void |
swapXY()
swap x and y coordinates -
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDoubleList, getIntArray, getString, getString, hashCode, isValidString, matches, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, sort, subtract, toString, unify, volume
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
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public JDFXYPair()
@Deprecated public JDFXYPair(Vector v) throws DataFormatException
v
- Vector of DoubleDataFormatException
- - if the Vector has not a valid formatpublic JDFXYPair(String s) throws DataFormatException
s
- the given StringDataFormatException
- - if the String has not a valid formatpublic JDFXYPair(JDFNumList nl) throws DataFormatException
nl
- the given number listDataFormatException
- - if the JDFNumberList has not a valid formatpublic JDFXYPair(JDFShape shape)
shape
- the given number listpublic JDFXYPair(JDFXYPair nl)
nl
- the given number listpublic JDFXYPair(double x, double y)
x
- the x coordinatey
- the y coordinatepublic static JDFXYPair createXYPair(String s)
s
- the string to parsepublic boolean isValid() throws DataFormatException
isValid
in class JDFNumList
DataFormatException
- - if the Vector has not a valid formatpublic double getX()
public void setX(double x)
x
- the x coordinatepublic double getY()
public void swapXY()
public void setY(double y)
y
- the y coordinatepublic boolean isGreaterOrEqual(JDFXYPair x)
x
- the JDFXYPair object to compare topublic boolean isLessOrEqual(JDFXYPair x)
x
- the JDFXYPair object to compare topublic boolean isGreater(JDFXYPair x)
x
- the JDFXYPair object to compare topublic boolean isPortrait()
public boolean isLess(JDFXYPair x)
x
- the JDFXYPair object to compare topublic void setString(String string) throws DataFormatException
setString
in class JDFNumList
DataFormatException
JDFNumList.setString(java.lang.String)
Copyright © 2018. All rights reserved.