Record Class RandomCombinationTeamSupplier
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.storage.supplier.RandomCombinationTeamSupplier
- All Implemented Interfaces:
TeamSupplier
public record RandomCombinationTeamSupplier(List<String> options, int minSelections, int maxSelections)
extends Record
implements TeamSupplier
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RandomCombinationTeamSupplier>
-
Constructor Summary
ConstructorDescriptionRandomCombinationTeamSupplier
(List<String> options, int minSelections, int maxSelections) Creates an instance of aRandomCombinationTeamSupplier
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPartyStorage
from the team supplier.com.mojang.serialization.Codec<? extends TeamSupplier>
codec()
Gets the codec for theTeamSupplier
.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxSelections
record component.int
Returns the value of theminSelections
record component.options()
Returns the value of theoptions
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RandomCombinationTeamSupplier
Creates an instance of aRandomCombinationTeamSupplier
record class.- Parameters:
options
- the value for theoptions
record componentminSelections
- the value for theminSelections
record componentmaxSelections
- the value for themaxSelections
record component
-
-
Method Details
-
codec
Description copied from interface:TeamSupplier
Gets the codec for theTeamSupplier
.- Specified by:
codec
in interfaceTeamSupplier
- Returns:
- the codec
-
build
Description copied from interface:TeamSupplier
Builds aPartyStorage
from the team supplier.- Specified by:
build
in interfaceTeamSupplier
- Returns:
- the
PartyStorage
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
options
Returns the value of theoptions
record component.- Returns:
- the value of the
options
record component
-
minSelections
public int minSelections()Returns the value of theminSelections
record component.- Returns:
- the value of the
minSelections
record component
-
maxSelections
public int maxSelections()Returns the value of themaxSelections
record component.- Returns:
- the value of the
maxSelections
record component
-