public class WrappedIntHashMap extends AbstractWrapper
handle, handleType| Modifier and Type | Method and Description |
|---|---|
static WrappedIntHashMap |
fromHandle(Object handle)
Construct a wrapper around a given NMS IntHashMap.
|
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,
Object value)
Associates a specified key with the given value in the integer map.
|
Object |
remove(int key)
Remove a mapping of a key to a value if it is present.
|
equals, getHandle, getHandleType, hashCode, setHandle, toStringpublic static WrappedIntHashMap newMap()
public static WrappedIntHashMap fromHandle(@Nonnull Object handle)
handle - - the NMS IntHashMap.IllegalArgumentException - If the handle is not an IntHasMap.public void put(int key,
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.RuntimeException - If the reflection machinery failed.public Object get(int key)
key - - the integer key.public Object remove(int key)
key - - the key of the mapping to remove.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.