Record Class UnnamedPatternsVariablesPreviewExamples.Line
java.lang.Object
java.lang.Record
net.jrodolfo.java_evolution.java21.UnnamedPatternsVariablesPreviewExamples.Line
- Record Components:
start- starting pointend- ending point
- Enclosing class:
UnnamedPatternsVariablesPreviewExamples
public static record UnnamedPatternsVariablesPreviewExamples.Line(UnnamedPatternsVariablesPreviewExamples.Point start, UnnamedPatternsVariablesPreviewExamples.Point end)
extends Record
Line record used by the unnamed record-pattern example.
-
Constructor Summary
ConstructorsConstructorDescriptionLine(UnnamedPatternsVariablesPreviewExamples.Point start, UnnamedPatternsVariablesPreviewExamples.Point end) Creates an instance of aLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Line
public Line(UnnamedPatternsVariablesPreviewExamples.Point start, UnnamedPatternsVariablesPreviewExamples.Point end) Creates an instance of aLinerecord class.
-
-
Method Details
-
toString
-
hashCode
-
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). -
start
-
end
-