Record Class DaytimeRestriction.Duo
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.registry.fishrestrictions.DaytimeRestriction.Duo
- Enclosing class:
DaytimeRestriction
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DaytimeRestriction.Duo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfirst()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.intsecond()Returns the value of thesecondrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Duo
public Duo(int first, int second) Creates an instance of aDuorecord class.- Parameters:
first- the value for thefirstrecord componentsecond- the value for thesecondrecord component
-
-
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 with thecomparemethod from their corresponding wrapper classes. -
first
public int first()Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
second
public int second()Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-