Record Class CapabilityRegistry.StoredCap<C>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.capabilities.CapabilityRegistry.StoredCap<C>
- Enclosing class:
CapabilityRegistry<C>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncap()
Returns the value of thecap
record component.Class
<?> Returns the value of thecontextClass
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Class
<?> Returns the value of thetypeClass
record component.
-
Field Details
-
cap
The field for thecap
record component. -
typeClass
The field for thetypeClass
record component. -
contextClass
The field for thecontextClass
record component.
-
-
Constructor Details
-
StoredCap
Creates an instance of aStoredCap
record class.- Parameters:
cap
- the value for thecap
record componenttypeClass
- the value for thetypeClass
record componentcontextClass
- the value for thecontextClass
record component
-
-
Method Details
-
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)
. -
cap
Returns the value of thecap
record component.- Returns:
- the value of the
cap
record component
-
typeClass
Returns the value of thetypeClass
record component.- Returns:
- the value of the
typeClass
record component
-
contextClass
Returns the value of thecontextClass
record component.- Returns:
- the value of the
contextClass
record component
-