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

  • Constructor Details

    • ValueMap

      public ValueMap()
  • Method Details

    • addItem

      public boolean addItem​(ValueMapItem thisItem)
    • 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

      public ValueMapItem getItem​(int keyVal)
    • findItem

      public ValueMapItem findItem​(java.lang.Object o)
      Find item in map whose value is o. Returns Integer.MIN_VALUE if not found
      Parameters:
      o -
      Returns:
    • getSize

      public int getSize()