T - The thing this map maps ontoP - The stack class (i.e. ItemStack, FluidStack) used for lookupspublic abstract class StackMap<P,T>
extends java.util.HashMap<P,T>
| Constructor and Description |
|---|
StackMap() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
areEqual(P a,
java.lang.Object b)
Is a, the key used to lookup, equivelant to the key b
|
boolean |
containsKey(java.lang.Object key) |
T |
get(java.lang.Object key) |
protected abstract P |
getStack(java.lang.Object key)
Converts a key used to lookup something into P (ItemStack or FluidStack)
|
protected abstract boolean |
isValidKey(java.lang.Object key)
Can this key be added to the map
|
T |
put(P key,
T value) |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic final boolean containsKey(java.lang.Object key)
@Nullable public final T get(java.lang.Object key)
protected abstract boolean areEqual(P a, java.lang.Object b)
a - b - protected abstract boolean isValidKey(java.lang.Object key)
key - @Nullable protected abstract P getStack(java.lang.Object key)
key -