Record Class CapabilityRegistry.StoredCap<C>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.capabilities.CapabilityRegistry.StoredCap<C>
- Enclosing class:
CapabilityRegistry<C>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncap()Returns the value of thecaprecord component.Class<?> Returns the value of thecontextClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Class<?> Returns the value of thetypeClassrecord component.
-
Field Details
-
cap
The field for thecaprecord component. -
typeClass
The field for thetypeClassrecord component. -
contextClass
The field for thecontextClassrecord component.
-
-
Constructor Details
-
StoredCap
Creates an instance of aStoredCaprecord class.- Parameters:
cap- the value for thecaprecord componenttypeClass- the value for thetypeClassrecord componentcontextClass- the value for thecontextClassrecord 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 thecaprecord component.- Returns:
- the value of the
caprecord component
-
typeClass
Returns the value of thetypeClassrecord component.- Returns:
- the value of the
typeClassrecord component
-
contextClass
Returns the value of thecontextClassrecord component.- Returns:
- the value of the
contextClassrecord component
-