Interface FullMappings

All Superinterfaces:
BiMappings, Mappings
All Known Implementing Classes:
FullIdentityMappings, FullMappingsBase, LegacyFullStringMappingsBase, ParticleMappings

public interface FullMappings extends BiMappings
Mappings containing the full string identifier mappings.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    id(String identifier)
    Returns the unmapped integer id for the given identifier, or -1 if not found.
    default @Nullable String
    identifier(int id)
    Returns the unmapped string identifier for the given mapped id.
    default @Nullable String
    identifier(String mappedIdentifier)
    Returns the unmapped string identifier for the given mapped identifier.
    Returns the inverse of the bimappings.
    boolean
    Returns whether the int id mappings are identity mappings.
    @Nullable Key
    keyFromId(int id)
    Returns the unmapped key for the given mapped id.
    @Nullable Key
    keyFromMappedKey(String mappedIdentifier)
    Returns the unmapped key for the given mapped identifier.
    int
    mappedId(String mappedIdentifier)
    Returns the mapped integer id for the given mapped identifier, or -1 if not found.
    default @Nullable String
    mappedIdentifier(int mappedId)
    Returns the mapped string identifier for the given mapped id.
    default @Nullable String
    Returns the mapped string identifier for the given unmapped identifier.
    @Nullable Key
    Returns the mapped key for the given unmapped identifier.
    @Nullable Key
    mappedKeyFromMappedId(int mappedId)
    Returns the mapped key for the given mapped id.

    Methods inherited from interface com.viaversion.viaversion.api.data.Mappings

    contains, getNewId, getNewIdOrDefault, isIdentity, mappedSize, setNewId, size
  • Method Details

    • id

      int id(String identifier)
      Returns the unmapped integer id for the given identifier, or -1 if not found.
      Parameters:
      identifier - unmapped string identifier
      Returns:
      unmapped int id, or -1 if not found
    • mappedId

      int mappedId(String mappedIdentifier)
      Returns the mapped integer id for the given mapped identifier, or -1 if not found.
      Parameters:
      mappedIdentifier - mapped string identifier
      Returns:
      mapped int id, or -1 if not found
    • identifier

      default @Nullable String identifier(int id)
      Returns the unmapped string identifier for the given mapped id.
      Parameters:
      id - unmapped id
      Returns:
      unmapped string identifier, or null if out of bounds
    • identifier

      default @Nullable String identifier(String mappedIdentifier)
      Returns the unmapped string identifier for the given mapped identifier.
      Parameters:
      mappedIdentifier - mapped identifier
      Returns:
      unmapped string identifier, or null if not found
    • mappedIdentifier

      default @Nullable String mappedIdentifier(int mappedId)
      Returns the mapped string identifier for the given mapped id.
      Parameters:
      mappedId - mapped id
      Returns:
      mapped string identifier, or null if out of bounds
    • mappedIdentifier

      default @Nullable String mappedIdentifier(String identifier)
      Returns the mapped string identifier for the given unmapped identifier.
      Parameters:
      identifier - unmapped identifier
      Returns:
      mapped string identifier, or null if not found
    • keyFromId

      @Nullable Key keyFromId(int id)
      Returns the unmapped key for the given mapped id.
      Parameters:
      id - unmapped id
      Returns:
      unmapped key, or null if out of bounds
    • keyFromMappedKey

      @Nullable Key keyFromMappedKey(String mappedIdentifier)
      Returns the unmapped key for the given mapped identifier.
      Parameters:
      mappedIdentifier - mapped identifier
      Returns:
      unmapped key, or null if not found
    • mappedKeyFromMappedId

      @Nullable Key mappedKeyFromMappedId(int mappedId)
      Returns the mapped key for the given mapped id.
      Parameters:
      mappedId - mapped id
      Returns:
      mapped key, or null if out of bounds
    • mappedKeyFromKey

      @Nullable Key mappedKeyFromKey(String identifier)
      Returns the mapped key for the given unmapped identifier.
      Parameters:
      identifier - unmapped identifier
      Returns:
      mapped key, or null if not found
    • isIntIdIdentity

      boolean isIntIdIdentity()
      Returns whether the int id mappings are identity mappings.
      Returns:
      whether the int id mappings are identity mappings
      See Also:
    • inverse

      FullMappings inverse()
      Description copied from interface: BiMappings
      Returns the inverse of the bimappings.
      Specified by:
      inverse in interface BiMappings
      Specified by:
      inverse in interface Mappings
      Returns:
      inverse of the bimappings