Class WrappedIntHashMap

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedIntHashMap

@Deprecated public class WrappedIntHashMap extends AbstractWrapper
Deprecated.
IntHashMap no longer exists
Represents a wrapper for the internal IntHashMap in Minecraft.
  • Method Details

    • newMap

      public static WrappedIntHashMap newMap()
      Deprecated.
      Construct a new IntHashMap.
      Returns:
      A new IntHashMap.
    • fromHandle

      public static WrappedIntHashMap fromHandle(@Nonnull Object handle)
      Deprecated.
      Construct a wrapper around a given NMS IntHashMap.
      Parameters:
      handle - - the NMS IntHashMap.
      Returns:
      The created wrapped.
      Throws:
      IllegalArgumentException - If the handle is not an IntHasMap.
    • put

      public void put(int key, Object value)
      Deprecated.
      Associates a specified key with the given value in the integer map.

      If the key has already been associated with a value, then it will be replaced by the new value.

      Parameters:
      key - - the key to insert.
      value - - the value to insert. Cannot be NULL.
      Throws:
      RuntimeException - If the reflection machinery failed.
    • get

      public Object get(int key)
      Deprecated.
      Retrieve the value associated with a specific key, or NULL if not found.
      Parameters:
      key - - the integer key.
      Returns:
      The associated value, or NULL.
    • remove

      public Object remove(int key)
      Deprecated.
      Remove a mapping of a key to a value if it is present.
      Parameters:
      key - - the key of the mapping to remove.
      Returns:
      The object that was removed, or NULL if the key is not present.