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