Interface IdMap<T>

All Superinterfaces:
Iterable<T>
All Known Subinterfaces:
DefaultedRegistry<T>, Registry<T>, WritableRegistry<T>
All Known Implementing Classes:
BaseMappedRegistry, CrudeIncrementalIntIdentityHashBiMap, DefaultedMappedRegistry, IdMapper, MappedRegistry, NeoForgeRegistryCallbacks.BlockCallbacks.ClearableObjectIntIdentityMap

public interface IdMap<T> extends Iterable<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byId(int pId)
     
    default T
    byIdOrThrow(int pId)
     
    int
    getId(T pValue)
     
    default int
    getIdOrThrow(T pValue)
     
    int
     

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Field Details

  • Method Details

    • getId

      int getId(T pValue)
      Returns:
      the integer ID used to identify the given object
    • byId

      @Nullable T byId(int pId)
    • byIdOrThrow

      default T byIdOrThrow(int pId)
    • getIdOrThrow

      default int getIdOrThrow(T pValue)
    • size

      int size()