Record Class ExampleRecord

java.lang.Object
java.lang.Record
dev.enola.common.io.object.ExampleRecord

public record ExampleRecord(@Nullable String string, Set<String> stringSet, List<String> stringList, @Nullable ExampleRecord example, @Nullable String defaultValue, @Nullable Instant timestamp, @Nullable Boolean isPrivate, @Nullable ExampleIdentifiableRecord exampleIdentifiableRecord, List<ExampleIdentifiableRecord> exampleIdentifiableRecords, Map<String,ExampleIdentifiableRecord> exampleIdentifiableRecordMap) extends Record
  • Constructor Details

    • ExampleRecord

      public ExampleRecord(@Nullable String string, Set<String> stringSet, List<String> stringList, @Nullable ExampleRecord example, @Nullable String defaultValue, @Nullable Instant timestamp, @Nullable Boolean isPrivate, @Nullable ExampleIdentifiableRecord exampleIdentifiableRecord, List<ExampleIdentifiableRecord> exampleIdentifiableRecords, Map<String,ExampleIdentifiableRecord> exampleIdentifiableRecordMap)
      Creates an instance of a ExampleRecord record class.
      Parameters:
      string - the value for the string record component
      stringSet - the value for the stringSet record component
      stringList - the value for the stringList record component
      example - the value for the example record component
      defaultValue - the value for the defaultValue record component
      timestamp - the value for the timestamp record component
      isPrivate - the value for the isPrivate record component
      exampleIdentifiableRecord - the value for the exampleIdentifiableRecord record component
      exampleIdentifiableRecords - the value for the exampleIdentifiableRecords record component
      exampleIdentifiableRecordMap - the value for the exampleIdentifiableRecordMap record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • string

      public @Nullable String string()
      Returns the value of the string record component.
      Returns:
      the value of the string record component
    • stringSet

      public Set<String> stringSet()
      Returns the value of the stringSet record component.
      Returns:
      the value of the stringSet record component
    • stringList

      public List<String> stringList()
      Returns the value of the stringList record component.
      Returns:
      the value of the stringList record component
    • example

      public @Nullable ExampleRecord example()
      Returns the value of the example record component.
      Returns:
      the value of the example record component
    • defaultValue

      public @Nullable String defaultValue()
      Returns the value of the defaultValue record component.
      Returns:
      the value of the defaultValue record component
    • timestamp

      public @Nullable Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • isPrivate

      public @Nullable Boolean isPrivate()
      Returns the value of the isPrivate record component.
      Returns:
      the value of the isPrivate record component
    • exampleIdentifiableRecord

      Returns the value of the exampleIdentifiableRecord record component.
      Returns:
      the value of the exampleIdentifiableRecord record component
    • exampleIdentifiableRecords

      Returns the value of the exampleIdentifiableRecords record component.
      Returns:
      the value of the exampleIdentifiableRecords record component
    • exampleIdentifiableRecordMap

      Returns the value of the exampleIdentifiableRecordMap record component.
      Returns:
      the value of the exampleIdentifiableRecordMap record component