Package mgui.interfaces.maps
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
-
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
- 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 classjava.lang.Object
-