Package net.ixdarklord.folios.api
Record Class FoliosSources.Row
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.FoliosSources.Row
- Enclosing class:
- FoliosSources
A row of a source: its id, and its fields by name.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.A field's text; empty when the row hasn't it.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.with(FoliosSources.Row other) This row with another's fields over its own: what a data pack's row with a used id does.
-
Constructor Details
-
Row
Creates an instance of aRowrecord class.- Parameters:
id- the value for theidrecord componentfields- the value for thefieldsrecord component
-
-
Method Details
-
field
A field's text; empty when the row hasn't it."id"is the row's id unless a field says otherwise. -
with
This row with another's fields over its own: what a data pack's row with a used id does. -
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-