Class XYPair


  • public class XYPair
    extends AbstractXJdfType<java.lang.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 Summary

      Constructors 
      Constructor Description
      XYPair()
      Default constructor.
      XYPair​(float x, float y)
      Custom constructor, accepting several values for initializing.
      XYPair​(java.lang.String expression)
      Custom Constructor.
    • Constructor Detail

      • 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​(java.lang.String expression)
        Custom Constructor. Creates a new XYPair instance by a String expression.
        Parameters:
        expression - XYPair as String expression.
    • Method Detail

      • 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 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 java.lang.String marshal​(XYPair xyPair)
        Specified by:
        marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​XYPair>
        See Also:
        XmlAdapter.marshal(java.lang.Object)
      • unmarshal

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

        public java.lang.String toString()
        Specified by:
        toString in class AbstractXJdfType<java.lang.String,​XYPair>
        See Also:
        Object.toString()