Record Class ExprRect

java.lang.Object
java.lang.Record
dev.pfaff.altargui.ffi.ExprRect
All Implemented Interfaces:
IRect<Expression>

public record ExprRect(Expression x, Expression y, Expression width, Expression height) extends Record implements IRect<Expression>
  • Field Details

    • ZERO

      public static final ExprRect ZERO
  • Constructor Details

    • ExprRect

      public ExprRect(double x, double y, double width, double height)
    • ExprRect

      public ExprRect(ToExpression x, ToExpression y, ToExpression width, ToExpression height)
    • ExprRect

      public ExprRect(VarRect rect)
    • ExprRect

      public ExprRect(Expression x, Expression y, Expression width, Expression height)
      Creates an instance of a ExprRect record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      width - the value for the width record component
      height - the value for the height record component
  • Method Details

    • withX

      public ExprRect withX(Expression x)
      Specified by:
      withX in interface IRect<Expression>
    • withY

      public ExprRect withY(Expression y)
      Specified by:
      withY in interface IRect<Expression>
    • withWidth

      public ExprRect withWidth(Expression width)
      Specified by:
      withWidth in interface IRect<Expression>
    • withHeight

      public ExprRect withHeight(Expression height)
      Specified by:
      withHeight in interface IRect<Expression>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • x

      public Expression x()
      Returns the value of the x record component.
      Specified by:
      x in interface IRect<Expression>
      Returns:
      the value of the x record component
    • y

      public Expression y()
      Returns the value of the y record component.
      Specified by:
      y in interface IRect<Expression>
      Returns:
      the value of the y record component
    • width

      public Expression width()
      Returns the value of the width record component.
      Specified by:
      width in interface IRect<Expression>
      Returns:
      the value of the width record component
    • height

      public Expression height()
      Returns the value of the height record component.
      Specified by:
      height in interface IRect<Expression>
      Returns:
      the value of the height record component