Record Class ForgeFeature.Bound
java.lang.Object
java.lang.Record
net.neoforged.neoforgespi.locating.ForgeFeature.Bound
- Record Components:
featureName- the name of the featurefeatureBound- the requested bound
- Enclosing class:
ForgeFeature
public static record ForgeFeature.Bound(String featureName, String featureBound, IModInfo modInfo)
extends Record
A Bound, from a mods.toml file
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thefeatureBoundrecord component.private final StringThe field for thefeatureNamerecord component.private final IModInfoThe field for themodInforecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tbound()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefeatureBoundrecord component.Returns the value of thefeatureNamerecord component.final inthashCode()Returns a hash code value for this object.modInfo()Returns the value of themodInforecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
featureName
The field for thefeatureNamerecord component. -
featureBound
The field for thefeatureBoundrecord component. -
modInfo
The field for themodInforecord component.
-
-
Constructor Details
-
Bound
Creates an instance of aBoundrecord class.- Parameters:
featureName- the value for thefeatureNamerecord componentfeatureBound- the value for thefeatureBoundrecord componentmodInfo- the value for themodInforecord component
-
-
Method Details
-
bound
public <T> T bound() -
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). -
featureName
Returns the value of thefeatureNamerecord component.- Returns:
- the value of the
featureNamerecord component
-
featureBound
Returns the value of thefeatureBoundrecord component.- Returns:
- the value of the
featureBoundrecord component
-
modInfo
Returns the value of themodInforecord component.- Returns:
- the value of the
modInforecord component
-