Package app.media
Record Class PenStroke.Segment
java.lang.Object
java.lang.Record
app.media.PenStroke.Segment
- All Implemented Interfaces:
Serializable
- Enclosing class:
- PenStroke
public static record PenStroke.Segment(double endX, double endY)
extends Record
implements Serializable
Data for a single line segment in a stroke.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSegment(double endX, double endY) Creates an instance of aSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleendX()Returns the value of theendXrecord component.doubleendY()Returns the value of theendYrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Segment
public Segment(double endX, double endY) Creates an instance of aSegmentrecord class.- Parameters:
endX- the value for theendXrecord componentendY- the value for theendYrecord component
-
-
Method Details
-
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 with '=='. -
endX
public double endX()Returns the value of theendXrecord component.- Returns:
- the value of the
endXrecord component
-
endY
public double endY()Returns the value of theendYrecord component.- Returns:
- the value of the
endYrecord component
-