Class AbstractMappingImpl<M extends Mapping,​P>

    • Constructor Detail

      • AbstractMappingImpl

        protected AbstractMappingImpl​(MappingSet mappings,
                                      java.lang.String obfuscatedName,
                                      java.lang.String deobfuscatedName)
        Creates a new de-obfuscation mapping, based on the given obfuscated name and de-obfuscated name.
        Parameters:
        mappings - The mappings set, this mapping belongs to
        obfuscatedName - The obfuscated name
        deobfuscatedName - The de-obfuscated name
    • Method Detail

      • getObfuscatedName

        public java.lang.String getObfuscatedName()
        Description copied from interface: Mapping
        Gets the obfuscated name of the member being represented.
        Specified by:
        getObfuscatedName in interface Mapping<M extends Mapping,​P>
        Returns:
        The obfuscated name
      • setDeobfuscatedName

        public M setDeobfuscatedName​(java.lang.String deobfuscatedName)
        Description copied from interface: Mapping
        Sets the de-obfuscated name of the member.
        Specified by:
        setDeobfuscatedName in interface Mapping<M extends Mapping,​P>
        Parameters:
        deobfuscatedName - The new de-obfuscated name
        Returns:
        this for chaining
      • hasDeobfuscatedName

        public boolean hasDeobfuscatedName()
        Description copied from interface: Mapping
        Establishes whether the mapping has had a de-obfuscated name set.
        Specified by:
        hasDeobfuscatedName in interface Mapping<M extends Mapping,​P>
        Returns:
        True if the mapping is mapped, false otherwise
      • get

        public <T> java.util.Optional<T> get​(ExtensionKey<T> key)
        Description copied from interface: Mapping
        Gets the value of the extension data, if it exists.
        Specified by:
        get in interface Mapping<M extends Mapping,​P>
        Type Parameters:
        T - The type of the extension data
        Parameters:
        key - The key of the extension data
        Returns:
        The value, wrapped in an Optional
      • set

        public <T> void set​(ExtensionKey<T> key,
                            T value)
        Description copied from interface: Mapping
        Sets the given extension data to the given value.
        Specified by:
        set in interface Mapping<M extends Mapping,​P>
        Type Parameters:
        T - The type of the extension data
        Parameters:
        key - The extension data key
        value - The extension data value
      • buildToString

        protected java.util.StringJoiner buildToString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object