Class TypeMap

java.lang.Object
mgui.interfaces.maps.TypeMap

public class TypeMap
extends java.lang.Object
Holds a static list of constants representing distinct types, and an integer field indicating the type of the present instance.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected int type  
    protected java.util.HashMap<java.lang.Integer,​java.lang.String> types  
  • Constructor Summary

    Constructors
    Constructor Description
    TypeMap()  
  • Method Summary

    Modifier and Type Method Description
    void addType​(int value, java.lang.String typeStr)  
    int getType()  
    java.util.ArrayList<java.lang.String> getTypes()  
    java.lang.String getTypeStr()  
    void setType​(int t)  
    void setType​(int value, java.lang.String typeStr)  
    void setType​(java.lang.String typeStr)  
    void setTypes​(java.util.HashMap<java.lang.Integer,​java.lang.String> types)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • type

      protected int type
    • types

      protected java.util.HashMap<java.lang.Integer,​java.lang.String> types
  • Constructor Details

    • TypeMap

      public TypeMap()
  • Method Details

    • addType

      public void addType​(int value, java.lang.String typeStr) throws TypeExistsException
      Throws:
      TypeExistsException
    • setType

      public void setType​(int value, java.lang.String typeStr)
    • getType

      public int getType()
    • getTypes

      public java.util.ArrayList<java.lang.String> getTypes()
    • setTypes

      public void setTypes​(java.util.HashMap<java.lang.Integer,​java.lang.String> types)
    • setType

      public void setType​(int t)
    • setType

      public void setType​(java.lang.String typeStr)
    • getTypeStr

      public java.lang.String getTypeStr()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object