Package org.cip4.lib.xjdf.type
Class XYPair
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
XML Attributes of type XYPair are used to describe sizes like Dimensions and StartPosition. They can also be used to
describe positions on a page. All
numbers that describe lengths are defined in points. XYPair Attributes are primitive data types and are encoded as a
string of two numbers, separated by
whitespace: "x y"
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType
equals, hashCode
-
Constructor Details
-
XYPair
public XYPair()Default constructor. Creates an default XYPair object. -
XYPair
public XYPair(float x, float y) Custom constructor, accepting several values for initializing. -
XYPair
Custom Constructor. Creates a new XYPair instance by a String expression.- Parameters:
expression- XYPair as String expression.
-
-
Method Details
-
getX
public float getX()Getter for x attribute.- Returns:
- the x
-
getY
public float getY()Getter for y attribute.- Returns:
- the y
-
add
Adds another XYPair the the current one.- Parameters:
other- The other one.- Returns:
- The sum of both XYPairs.
-
subtract
Subtracts another XYPair from the current one.- Parameters:
other- The other one.- Returns:
- The difference of both XYPairs.
-
marshal
-
unmarshal
-
toString
- Specified by:
toStringin classAbstractXJdfType<String,XYPair> - See Also:
-