public class WrappedIntHashMap extends AbstractWrapper
handle, handleType| Modifier and Type | Method and Description |
|---|---|
static WrappedIntHashMap |
fromHandle(java.lang.Object handle)
Construct a wrapper around a given NMS IntHashMap.
|
java.lang.Object |
get(int key)
Retrieve the value associated with a specific key, or NULL if not found.
|
static WrappedIntHashMap |
newMap()
Construct a new IntHashMap.
|
void |
put(int key,
java.lang.Object value)
Associates a specified key with the given value in the integer map.
|
java.lang.Object |
remove(int key)
Remove a mapping of a key to a value if it is present.
|
getHandle, getHandleType, setHandlepublic static WrappedIntHashMap newMap()
public static WrappedIntHashMap fromHandle(@Nonnull java.lang.Object handle)
handle - - the NMS IntHashMap.java.lang.IllegalArgumentException - If the handle is not an IntHasMap.public void put(int key,
java.lang.Object value)
If the key has already been associated with a value, then it will be replaced by the new value.
key - - the key to insert.value - - the value to insert. Cannot be NULL.java.lang.RuntimeException - If the reflection machinery failed.public java.lang.Object get(int key)
key - - the integer key.public java.lang.Object remove(int key)
key - - the key of the mapping to remove.