Record Class Rectangle.Dynamic
java.lang.Object
java.lang.Record
codechicken.lib.gui.modular.lib.geometry.Rectangle.Dynamic
- All Implemented Interfaces:
Rectangle
- Enclosing interface:
Rectangle
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.lib.gui.modular.lib.geometry.Rectangle
Rectangle.Dynamic, Rectangle.Immutable, Rectangle.Mutable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetHeightrecord component.getWidth()Returns the value of thegetWidthrecord component.final inthashCode()Returns a hash code value for this object.doubleheight()pos()position()Returns the value of thepositionrecord component.toString()Returns a string representation of this record class.doublewidth()
-
Constructor Details
-
Dynamic
Creates an instance of aDynamicrecord class.- Parameters:
position- the value for thepositionrecord componentgetWidth- the value for thegetWidthrecord componentgetHeight- the value for thegetHeightrecord component
-
-
Method Details
-
pos
-
width
public double width() -
height
public double height() -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
getWidth
Returns the value of thegetWidthrecord component.- Returns:
- the value of the
getWidthrecord component
-
getHeight
Returns the value of thegetHeightrecord component.- Returns:
- the value of the
getHeightrecord component
-