Package com.pdftools.geometry.units
Class Point
- java.lang.Object
-
- com.pdftools.geometry.units.Point
-
public class Point extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Length
getX()
Gets the horizontal coordinate asLength
object.Length
getY()
Gets the vertical coordinate asLength
object.int
hashCode()
static Point
parse(java.lang.String value)
Create aPoint
object from the string representation of a x-y-coordinate pair.java.lang.String
toString()
Creates a string representation as x-y-pair with associated suitable metric units, "m", "cm" or "mm".java.lang.String
toString(Length.Units unit)
Creates a string representation as x-y-pair with the specified unit.
-
-
-
Method Detail
-
parse
public static Point parse(java.lang.String value)
Create aPoint
object from the string representation of a x-y-coordinate pair.- Parameters:
value
- Allowed values are value-unit pairs of the form "<x_value><x_unit> <y_value><y_unit>". Allowed associated units are "um", "mm", "cm", "m", "km", "pt" and "in". Example: "12.3cm 23.9mm".- Returns:
-
toString
public java.lang.String toString()
Creates a string representation as x-y-pair with associated suitable metric units, "m", "cm" or "mm".- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(Length.Units unit)
Creates a string representation as x-y-pair with the specified unit.
-
getX
public Length getX()
Gets the horizontal coordinate as
Length
object.The horizontal axis is oriented from left to right.
-
getY
public Length getY()
Gets the vertical coordinate as
Length
object.The vertical axis is oriented from bottom to top.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-