Package mgui.interfaces.maps
Class ValueMap
java.lang.Object
mgui.interfaces.maps.ValueMap
public class ValueMap
extends java.lang.Object
Maps an integer key value with an assoicated object
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description java.util.ArrayList<ValueMapItem>
items
-
Constructor Summary
Constructors Constructor Description ValueMap()
-
Method Summary
Modifier and Type Method Description boolean
addItem(int keyVal, java.lang.Object objVal)
boolean
addItem(ValueMapItem thisItem)
ValueMapItem
findItem(java.lang.Object o)
Find item in map whose value is o.ValueMapItem
getItem(int keyVal)
int
getSize()
java.lang.Object
getValue(int keyVal)
boolean
removeItem(int keyVal)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
items
-
-
Constructor Details
-
ValueMap
public ValueMap()
-
-
Method Details
-
addItem
-
addItem
public boolean addItem(int keyVal, java.lang.Object objVal) -
removeItem
public boolean removeItem(int keyVal) -
getValue
public java.lang.Object getValue(int keyVal) -
getItem
-
findItem
Find item in map whose value is o. Returns Integer.MIN_VALUE if not found- Parameters:
o
-- Returns:
-
getSize
public int getSize()
-