Class Point

java.lang.Object
de.xima.fc.common.graphdot.Point
All Implemented Interfaces:
Serializable, CharSequence

public final class Point extends Object
A graphviz 2D or 3D point. 3D is valid only when the attribute dim is set to 3.
3.4,-7.4
3.4,-7.4!
3.4,-7.4,5.0
3.4,-7.4,5.0!
Since:
8.2.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Point(boolean fixed, double x, double y, Double z)
    Creates a new point with the given coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    default char
    charAt(int index)
     
    default IntStream
     
    default IntStream
     
    final boolean
     
    static Point
    fixed(double x, double y)
    Creates a new fixed 2D point with the given coordinates.
    static Point
    fixed(double x, double y, double z)
    Creates a new fixed 3D point with the given coordinates.
    double
    Gets the X position of the point.
    double
    Gets the Y position of the point.
    Gets the Z position of the point.
    final int
     
    boolean
    Checks whether this is a 2D point.
    boolean
    Checks whether this is a 3D point.
    boolean
    Get the flag that indicates that the node position should not change.
    default int
     
    static Point
    loose(double x, double y)
    Creates a new loose 2D point with the given coordinates.
    static Point
    loose(double x, double y, double z)
    Creates a new loose 3D point with the given coordinates.
    default CharSequence
    subSequence(int start, int end)
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Point

      public Point(boolean fixed, double x, double y, Double z)
      Creates a new point with the given coordinates.
      Parameters:
      fixed - Indicates that the node position should not change.
      x - The X position of the point.
      y - The Y position of the point.
      z - The Z position of the point.
  • Method Details

    • getX

      public double getX()
      Gets the X position of the point.
      Returns:
      The X position of the point.
    • getY

      public double getY()
      Gets the Y position of the point.
      Returns:
      The Y position of the point.
    • getZ

      public OptionalDouble getZ()
      Gets the Z position of the point.
      Returns:
      The Z position of the point.
    • is2D

      public boolean is2D()
      Checks whether this is a 2D point.
      Returns:
      Whether this is a 2D point.
    • is3D

      public boolean is3D()
      Checks whether this is a 3D point.
      Returns:
      Whether this is a 3D point.
    • isFixed

      public boolean isFixed()
      Get the flag that indicates that the node position should not change.
      Returns:
      Indicates that the node position should not change.
    • toString

      public String toString()
      Specified by:
      toString in interface CharSequence
    • fixed

      public static Point fixed(double x, double y)
      Creates a new fixed 2D point with the given coordinates.
      Parameters:
      x - The X position of the point.
      y - The Y position of the point.
      Returns:
      A new fixed 2D point.
    • fixed

      public static Point fixed(double x, double y, double z)
      Creates a new fixed 3D point with the given coordinates.
      Parameters:
      x - The X position of the point.
      y - The Y position of the point.
      z - The Z position of the point.
      Returns:
      A new fixed 3D point.
    • loose

      public static Point loose(double x, double y)
      Creates a new loose 2D point with the given coordinates.
      Parameters:
      x - The X position of the point.
      y - The Y position of the point.
      Returns:
      A new loose 2D point.
    • loose

      public static Point loose(double x, double y, double z)
      Creates a new loose 3D point with the given coordinates.
      Parameters:
      x - The X position of the point.
      y - The Y position of the point.
      z - The Z position of the point.
      Returns:
      A new loose 3D point.
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • charAt

      default char charAt(int index)
      Specified by:
      charAt in interface CharSequence
    • chars

      default IntStream chars()
      Specified by:
      chars in interface CharSequence
    • codePoints

      default IntStream codePoints()
      Specified by:
      codePoints in interface CharSequence
    • length

      default int length()
      Specified by:
      length in interface CharSequence
    • subSequence

      default CharSequence subSequence(int start, int end)
      Specified by:
      subSequence in interface CharSequence