Package net.minecraft.component
Record Class ComponentMap.Builder.SimpleComponentMap
java.lang.Object
java.lang.Record
net.minecraft.component.ComponentMap.Builder.SimpleComponentMap
- Record Components:
map-
- All Implemented Interfaces:
Iterable<Component<?>>,ComponentMap
- Enclosing class:
ComponentMap.Builder
private static record ComponentMap.Builder.SimpleComponentMap(Reference2ObjectMap<ComponentType<?>,Object> map)
extends Record
implements ComponentMap
- Mappings:
Namespace Name named net/minecraft/component/ComponentMap$Builder$SimpleComponentMapintermediary net/minecraft/class_9323$class_9324$class_9325official km$a$anamed mapintermediary comp_2440official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.component.ComponentMap
ComponentMap.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Reference2ObjectMap<ComponentType<?>, Object> The field for themaprecord component.Fields inherited from interface net.minecraft.component.ComponentMap
CODEC, EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSimpleComponentMap(Reference2ObjectMap<ComponentType<?>, Object> reference2ObjectMap) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(ComponentType<?> type) final booleanIndicates whether some other object is "equal to" this one.<T> Tget(ComponentType<? extends T> type) Set<ComponentType<?>> getTypes()final inthashCode()Returns a hash code value for this object.iterator()map()Returns the value of themaprecord component.intsize()toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.component.ComponentMap
copy, filtered, getOrDefault, isEmpty, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
map
The field for themaprecord component.
-
-
Constructor Details
-
SimpleComponentMap
SimpleComponentMap(Reference2ObjectMap<ComponentType<?>, Object> reference2ObjectMap)
-
-
Method Details
-
get
- Specified by:
getin interfaceComponentMap- Mappings:
Namespace Name Mixin selector named getLnet/minecraft/component/ComponentMap;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;intermediary method_57829Lnet/minecraft/class_9323;method_57829(Lnet/minecraft/class_9331;)Ljava/lang/Object;official aLkm;a(Lkp;)Ljava/lang/Object;
-
contains
- Specified by:
containsin interfaceComponentMap- Mappings:
Namespace Name Mixin selector named containsLnet/minecraft/component/ComponentMap;contains(Lnet/minecraft/component/ComponentType;)Zintermediary method_57832Lnet/minecraft/class_9323;method_57832(Lnet/minecraft/class_9331;)Zofficial bLkm;b(Lkp;)Z
-
getTypes
- Specified by:
getTypesin interfaceComponentMap- Mappings:
Namespace Name Mixin selector named getTypesLnet/minecraft/component/ComponentMap;getTypes()Ljava/util/Set;intermediary method_57831Lnet/minecraft/class_9323;method_57831()Ljava/util/Set;official bLkm;b()Ljava/util/Set;
-
iterator
- Specified by:
iteratorin interfaceComponentMap- Specified by:
iteratorin interfaceIterable<Component<?>>
-
size
public int size()- Specified by:
sizein interfaceComponentMap- Mappings:
Namespace Name Mixin selector named sizeLnet/minecraft/component/ComponentMap;size()Iintermediary method_57835Lnet/minecraft/class_9323;method_57835()Iofficial dLkm;d()I
-
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). -
map
Returns the value of themaprecord component.- Returns:
- the value of the
maprecord component
-