Record Class SequencedCollectionsExamples.SequenceSummary
java.lang.Object
java.lang.Record
net.jrodolfo.java_evolution.java21.SequencedCollectionsExamples.SequenceSummary
- Record Components:
first- the first element in encounter orderlast- the last element in encounter orderreversed- the values observed through the reversed view
- Enclosing class:
SequencedCollectionsExamples
-
Constructor Summary
ConstructorsConstructorDescriptionSequenceSummary(String first, String last, List<String> reversed) Creates an instance of aSequenceSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.first()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.last()Returns the value of thelastrecord component.reversed()Returns the value of thereversedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SequenceSummary
-
-
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). -
first
-
last
-
reversed
-