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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRegistry.Container.Loader<T extends ProtocolObject> -
Constructor Summary
ConstructorsConstructorDescriptionContainer(Registry.Resource resource, Map<String, T> namespaces, ObjectArray<T> ids) Creates an instance of aContainerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.getId(int id) inthashCode()Returns a hash code value for this object.ids()Returns the value of theidsrecord component.Returns the value of thenamespacesrecord component.resource()Returns the value of theresourcerecord component.intfinal StringtoString()Returns a string representation of this record class.values()
-
Constructor Details
-
Container
Creates an instance of aContainerrecord class.- Parameters:
resource- the value for theresourcerecord componentnamespaces- the value for thenamespacesrecord componentids- the value for theidsrecord 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 theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
namespaces
Returns the value of thenamespacesrecord component.- Returns:
- the value of the
namespacesrecord component
-
ids
Returns the value of theidsrecord component.- Returns:
- the value of the
idsrecord component
-