Class XYPair

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.cip4.lib.xjdf.type.AbstractXJdfType<String,XYPair>
org.cip4.lib.xjdf.type.XYPair

public class XYPair extends AbstractXJdfType<String,XYPair>
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 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

      public XYPair(String expression)
      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

      public XYPair add(XYPair other)
      Adds another XYPair the the current one.
      Parameters:
      other - The other one.
      Returns:
      The sum of both XYPairs.
    • subtract

      public XYPair subtract(XYPair other)
      Subtracts another XYPair from the current one.
      Parameters:
      other - The other one.
      Returns:
      The difference of both XYPairs.
    • marshal

      public String marshal(XYPair xyPair)
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,XYPair>
      See Also:
      • XmlAdapter.marshal(java.lang.Object)
    • unmarshal

      public XYPair unmarshal(String v)
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,XYPair>
      See Also:
      • XmlAdapter.unmarshal(java.lang.Object)
    • toString

      public String toString()
      Specified by:
      toString in class AbstractXJdfType<String,XYPair>
      See Also: