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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RandomCombinationTeamSupplier> -
Constructor Summary
ConstructorsConstructorDescriptionRandomCombinationTeamSupplier(List<String> options, int minSelections, int maxSelections) Creates an instance of aRandomCombinationTeamSupplierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPartyStoragefrom the team supplier.com.mojang.serialization.MapCodec<? extends TeamSupplier> codec()Gets the codec for theTeamSupplier.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxSelectionsrecord component.intReturns the value of theminSelectionsrecord component.options()Returns the value of theoptionsrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
CODEC
-
-
Constructor Details
-
RandomCombinationTeamSupplier
Creates an instance of aRandomCombinationTeamSupplierrecord class.- Parameters:
options- the value for theoptionsrecord componentminSelections- the value for theminSelectionsrecord componentmaxSelections- the value for themaxSelectionsrecord component
-
-
Method Details
-
codec
Description copied from interface:TeamSupplierGets the codec for theTeamSupplier.- Specified by:
codecin interfaceTeamSupplier- Returns:
- the codec
-
type
- Specified by:
typein interfaceTeamSupplier
-
build
Description copied from interface:TeamSupplierBuilds aPartyStoragefrom the team supplier.- Specified by:
buildin 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 theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
minSelections
public int minSelections()Returns the value of theminSelectionsrecord component.- Returns:
- the value of the
minSelectionsrecord component
-
maxSelections
public int maxSelections()Returns the value of themaxSelectionsrecord component.- Returns:
- the value of the
maxSelectionsrecord component
-