Record Class Position.Dynamic
java.lang.Object
java.lang.Record
codechicken.lib.gui.modular.lib.geometry.Position.Dynamic
- All Implemented Interfaces:
Position
- Enclosing interface:
- Position
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.lib.gui.modular.lib.geometry.Position
Position.Dynamic, Position.Immutable, Position.Mutable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getX()Returns the value of thegetXrecord component.getY()Returns the value of thegetYrecord component.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.doublex()doubley()
-
Constructor Details
-
Dynamic
Creates an instance of aDynamicrecord class.- Parameters:
getX- the value for thegetXrecord componentgetY- the value for thegetYrecord component
-
-
Method Details
-
x
public double x() -
y
public double y() -
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). -
getX
Returns the value of thegetXrecord component.- Returns:
- the value of the
getXrecord component
-
getY
Returns the value of thegetYrecord component.- Returns:
- the value of the
getYrecord component
-