Class Rectangular2DLong

java.lang.Object
de.xima.fc.common.geometry.Rectangular2DLong
All Implemented Interfaces:
Rectangular, Rectangular1D<Long>, Rectangular1DLike<Long>, Rectangular2D<Long>, Rectangular2DLike<Long>, Serializable

public final class Rectangular2DLong extends Object implements Rectangular2D<Long>, Rectangular2DLike<Long>
A two-dimensional rectangular shape, with a width and a height, where both dimensions are of type long.
Since:
8.5.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Rectangular2DLong(long width, long height)
    Creates a new rectangular shape with the specified width and height.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The dimension of the rectangle.
    Creates an empty rectangular shape with zero width and height.
    boolean
     
    int
     
    Returns the height of the rectangular shape.
    byte
    Returns the height of the rectangular shape as a byte.
    double
    Returns the height of the rectangular shape as a double.
    float
    Returns the height of the rectangular shape as a float.
    int
    Returns the height of the rectangular shape as an int.
    long
    Returns the height of the rectangular shape as a long.
    short
    Returns the height of the rectangular shape as a short.
    Gets the length of the side along the specified axis.
    Gets the length of the side along the specified axis.
    long
    Gets the length of the side along the specified axis, as a long.
    long
    Gets the length of the side along the specified axis as a long.
    plus(byte deltaWidth, byte deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(double deltaWidth, double deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(float deltaWidth, float deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(int deltaWidth, int deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(long deltaWidth, long deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(short deltaWidth, short deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
    plus(Long deltaWidth, Long deltaHeight)
    Creates a new rectangular shape with the specified delta width and height added to the current width and height.
     
    Returns the width of the rectangular shape.
    byte
    Returns the width of the rectangular shape as a byte.
    double
    Returns the width of the rectangular shape as a double.
    float
    Returns the width of the rectangular shape as a float.
    int
    Returns the width of the rectangular shape as an int.
    long
    Returns the width of the rectangular shape as a long.
    short
    Returns the width of the rectangular shape as a short.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Rectangular2D

    lengthByte, lengthDouble, lengthFloat, lengthInt, lengthShort
  • Constructor Details

    • Rectangular2DLong

      public Rectangular2DLong(long width, long height)
      Creates a new rectangular shape with the specified width and height.
      Parameters:
      width - The width of the rectangle.
      height - The height of the rectangle.
  • Method Details

    • dimensions

      public int dimensions()
      Description copied from interface: Rectangular
      The dimension of the rectangle.
      Specified by:
      dimensions in interface Rectangular
      Specified by:
      dimensions in interface Rectangular1D<Long>
      Specified by:
      dimensions in interface Rectangular2D<Long>
      Returns:
      The dimensionality of the rectangle.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • height

      public Long height()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape.
      Specified by:
      height in interface Rectangular2D<Long>
      Specified by:
      height in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightByte

      public byte heightByte()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as a byte.
      Specified by:
      heightByte in interface Rectangular2D<Long>
      Specified by:
      heightByte in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightDouble

      public double heightDouble()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as a double.
      Specified by:
      heightDouble in interface Rectangular2D<Long>
      Specified by:
      heightDouble in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightFloat

      public float heightFloat()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as a float.
      Specified by:
      heightFloat in interface Rectangular2D<Long>
      Specified by:
      heightFloat in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightInt

      public int heightInt()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as an int.
      Specified by:
      heightInt in interface Rectangular2D<Long>
      Specified by:
      heightInt in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightLong

      public long heightLong()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as a long.
      Specified by:
      heightLong in interface Rectangular2D<Long>
      Specified by:
      heightLong in interface Rectangular2DLike<Long>
      Returns:
      the height
    • heightShort

      public short heightShort()
      Description copied from interface: Rectangular2D
      Returns the height of the rectangular shape as a short.
      Specified by:
      heightShort in interface Rectangular2D<Long>
      Specified by:
      heightShort in interface Rectangular2DLike<Long>
      Returns:
      the height
    • length

      public Long length(ECartesianAxis2D axis)
      Description copied from interface: Rectangular2D
      Gets the length of the side along the specified axis.
      Specified by:
      length in interface Rectangular2D<Long>
      Parameters:
      axis - the axis to get the length along
      Returns:
      the length along the specified axis
    • length

      public Long length(ECartesianAxis1D axis)
      Description copied from interface: Rectangular1DLike
      Gets the length of the side along the specified axis.
      Specified by:
      length in interface Rectangular1DLike<Long>
      Parameters:
      axis - the axis to get the length along
      Returns:
      The length along the specified axis
    • lengthLong

      public long lengthLong(ECartesianAxis2D axis)
      Description copied from interface: Rectangular2D
      Gets the length of the side along the specified axis as a long.
      Specified by:
      lengthLong in interface Rectangular2D<Long>
      Parameters:
      axis - the axis to get the length along
      Returns:
      the length along the specified axis
    • lengthLong

      public long lengthLong(ECartesianAxis1D axis)
      Description copied from interface: Rectangular1DLike
      Gets the length of the side along the specified axis, as a long.
      Specified by:
      lengthLong in interface Rectangular1DLike<Long>
      Parameters:
      axis - the axis to get the length along
      Returns:
      The length along the specified axis
    • plus

      public Rectangular2DLong plus(Long deltaWidth, Long deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(byte deltaWidth, byte deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(short deltaWidth, short deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(int deltaWidth, int deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(long deltaWidth, long deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(float deltaWidth, float deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • plus

      public Rectangular2DLong plus(double deltaWidth, double deltaHeight)
      Description copied from interface: Rectangular2D
      Creates a new rectangular shape with the specified delta width and height added to the current width and height.
      Specified by:
      plus in interface Rectangular2D<Long>
      Parameters:
      deltaWidth - the width to add to the current width
      deltaHeight - the height to add to the current height
      Returns:
      A new rectangular shape with the specified dimensions.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • width

      public Long width()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape.
      Specified by:
      width in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthByte

      public byte widthByte()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as a byte.
      Specified by:
      widthByte in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthDouble

      public double widthDouble()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as a double.
      Specified by:
      widthDouble in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthFloat

      public float widthFloat()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as a float.
      Specified by:
      widthFloat in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthInt

      public int widthInt()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as an int.
      Specified by:
      widthInt in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthLong

      public long widthLong()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as a long.
      Specified by:
      widthLong in interface Rectangular1DLike<Long>
      Returns:
      the width
    • widthShort

      public short widthShort()
      Description copied from interface: Rectangular1DLike
      Returns the width of the rectangular shape as a short.
      Specified by:
      widthShort in interface Rectangular1DLike<Long>
      Returns:
      the width
    • empty

      public static Rectangular2DLong empty()
      Creates an empty rectangular shape with zero width and height.
      Returns:
      An empty rectangular shape.