Package dev.enola.common.io.object
Record Class ExampleIdentifiableRecord
java.lang.Object
java.lang.Record
dev.enola.common.io.object.ExampleIdentifiableRecord
- All Implemented Interfaces:
Identifiable
public record ExampleIdentifiableRecord(String id, Double number)
extends Record
implements Identifiable
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.enola.common.io.object.Identifiable
Identifiable.Builder<B extends Identifiable.Builder<B>> -
Constructor Summary
ConstructorsConstructorDescriptionExampleIdentifiableRecord(String id, Double number) Creates an instance of aExampleIdentifiableRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.number()Returns the value of thenumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExampleIdentifiableRecord
Creates an instance of aExampleIdentifiableRecordrecord class.- Parameters:
id- the value for theidrecord componentnumber- the value for thenumberrecord 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
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). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceIdentifiable- Returns:
- the value of the
idrecord component
-
number
Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-