Record Class ExtensionInfo
java.lang.Object
java.lang.Record
net.neoforged.fml.common.asm.enumextension.ExtensionInfo
- Record Components:
extended
- Whether this enum had additional entries added to itvanillaCount
- How many entries the enum originally contained, 0 if the enum is not extendedtotalCount
- How many entries the enum contains after extension, 0 if the enum is not extendednetCheck
- Whether the enum needs to be checked for network compatibility
public record ExtensionInfo(boolean extended, int vanillaCount, int totalCount, NetworkedEnum.NetworkCheck netCheck)
extends Record
Provides information on whether an enum was extended and how many entries are vanilla vs. modded
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
The field for theextended
record component.private final NetworkedEnum.NetworkCheck
The field for thenetCheck
record component.private final int
The field for thetotalCount
record component.private final int
The field for thevanillaCount
record component. -
Constructor Summary
ConstructorsConstructorDescriptionExtensionInfo
(boolean extended, int vanillaCount, int totalCount, NetworkedEnum.NetworkCheck netCheck) Creates an instance of aExtensionInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
extended()
Returns the value of theextended
record component.final int
hashCode()
Returns a hash code value for this object.netCheck()
Returns the value of thenetCheck
record component.static <T extends Enum<T> & IExtensibleEnum>
ExtensionInfononExtended
(Class<T> enumClass) final String
toString()
Returns a string representation of this record class.int
Returns the value of thetotalCount
record component.int
Returns the value of thevanillaCount
record component.
-
Field Details
-
extended
private final boolean extendedThe field for theextended
record component. -
vanillaCount
private final int vanillaCountThe field for thevanillaCount
record component. -
totalCount
private final int totalCountThe field for thetotalCount
record component. -
netCheck
The field for thenetCheck
record component.
-
-
Constructor Details
-
ExtensionInfo
public ExtensionInfo(boolean extended, int vanillaCount, int totalCount, @Nullable NetworkedEnum.NetworkCheck netCheck) Creates an instance of aExtensionInfo
record class.- Parameters:
extended
- the value for theextended
record componentvanillaCount
- the value for thevanillaCount
record componenttotalCount
- the value for thetotalCount
record componentnetCheck
- the value for thenetCheck
record component
-
-
Method Details
-
nonExtended
-
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 '=='. -
extended
public boolean extended()Returns the value of theextended
record component.- Returns:
- the value of the
extended
record component
-
vanillaCount
public int vanillaCount()Returns the value of thevanillaCount
record component.- Returns:
- the value of the
vanillaCount
record component
-
totalCount
public int totalCount()Returns the value of thetotalCount
record component.- Returns:
- the value of the
totalCount
record component
-
netCheck
Returns the value of thenetCheck
record component.- Returns:
- the value of the
netCheck
record component
-