Package net.minestom.server.registry
Record Class Registry.Container<T extends StaticProtocolObject>
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.Container<T>
- Enclosing class:
Registry
@Internal
public static record Registry.Container<T extends StaticProtocolObject>(Registry.Resource resource, Map<String,T extends StaticProtocolObject> namespaces, ObjectArray<T extends StaticProtocolObject> ids)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Registry.Container.Loader<T extends ProtocolObject>
-
Constructor Summary
ConstructorDescriptionContainer
(Registry.Resource resource, Map<String, T> namespaces, ObjectArray<T> ids) Creates an instance of aContainer
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.getId
(int id) int
hashCode()
Returns a hash code value for this object.ids()
Returns the value of theids
record component.Returns the value of thenamespaces
record component.resource()
Returns the value of theresource
record component.int
final String
toString()
Returns a string representation of this record class.values()
-
Constructor Details
-
Container
Creates an instance of aContainer
record class.- Parameters:
resource
- the value for theresource
record componentnamespaces
- the value for thenamespaces
record componentids
- the value for theids
record component
-
-
Method Details
-
get
-
getSafe
-
getId
-
toId
-
values
-
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)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
namespaces
Returns the value of thenamespaces
record component.- Returns:
- the value of the
namespaces
record component
-
ids
Returns the value of theids
record component.- Returns:
- the value of the
ids
record component
-