Record Class DataMapEntry.Removal<T,R> 
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.DataMapEntry.Removal<T,R> 
- Enclosing class:
- DataMapEntry<T>
public static record DataMapEntry.Removal<T,R> (com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> key, Optional<DataMapValueRemover<R,T>> remover)
extends Record  
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> The field for thekeyrecord component.private final Optional<DataMapValueRemover<R,T>> The field for theremoverrecord component.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateRemoval(com.mojang.datafixers.util.Either<TagKey<R>, ResourceKey<R>> key) Removal(com.mojang.datafixers.util.Either<TagKey<R>, ResourceKey<R>> key, Optional<DataMapValueRemover<R, T>> remover) Creates an instance of aRemovalrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T,R> com.mojang.serialization.Codec<DataMapEntry.Removal<T, R>> codec(com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<TagKey<R>, ResourceKey<R>>> tagOrValue, DataMapType<R, T> attachment) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> key()Returns the value of thekeyrecord component.remover()Returns the value of theremoverrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
keyThe field for thekeyrecord component.
- 
removerThe field for theremoverrecord component.
 
- 
- 
Constructor Details- 
Removal
- 
Removalpublic Removal(com.mojang.datafixers.util.Either<TagKey<R>, ResourceKey<R>> key, Optional<DataMapValueRemover<R, T>> remover) Creates an instance of aRemovalrecord class.- Parameters:
- key- the value for the- keyrecord component
- remover- the value for the- removerrecord component
 
 
- 
- 
Method Details- 
codecpublic static <T,R> com.mojang.serialization.Codec<DataMapEntry.Removal<T,R>> codec(com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<TagKey<R>, ResourceKey<R>>> tagOrValue, DataMapType<R, T> attachment) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
keyReturns the value of thekeyrecord component.- Returns:
- the value of the keyrecord component
 
- 
removerReturns the value of theremoverrecord component.- Returns:
- the value of the removerrecord component
 
 
-