model
Class ObjectType

java.lang.Object
  extended by model.ObjectType

public class ObjectType
extends java.lang.Object

Stores the type of a particular 3d object. Used in ComplexObject to tell accessors what type of object it is. Used in Model to instantiate new objects of a given type.


Nested Class Summary
static class ObjectType.ObjType
          These are all the ObjectTypes supported by the program.
 
Constructor Summary
ObjectType()
           
ObjectType(Model model)
           
ObjectType(Model model, ObjectType.ObjType type)
           
ObjectType(Model model, java.lang.String type)
           
ObjectType(ObjectType.ObjType type)
           
ObjectType(java.lang.String type)
           
 
Method Summary
 ObjectType copy(Model m)
           
 java.lang.String getComplexType()
           
 ComplexObject getObject()
           
 ComplexObject getObjectOf(ObjectType.ObjType type)
          Returns a new object of the given type.
 ObjectType.ObjType getObjType()
           
static ObjectType.ObjType getObjTypeOf(java.lang.String type)
           
static java.lang.String getStringOf(ObjectType.ObjType type)
          Returns the String representation of a given type.
 void setComplexType(java.lang.String t)
           
 void setObjType(ObjectType.ObjType type)
           
 void setObjType(java.lang.String type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectType

public ObjectType()

ObjectType

public ObjectType(ObjectType.ObjType type)

ObjectType

public ObjectType(java.lang.String type)

ObjectType

public ObjectType(Model model)

ObjectType

public ObjectType(Model model,
                  ObjectType.ObjType type)

ObjectType

public ObjectType(Model model,
                  java.lang.String type)
Method Detail

copy

public ObjectType copy(Model m)

setObjType

public void setObjType(ObjectType.ObjType type)

setObjType

public void setObjType(java.lang.String type)

getObjType

public ObjectType.ObjType getObjType()

getComplexType

public java.lang.String getComplexType()

setComplexType

public void setComplexType(java.lang.String t)

getObject

public ComplexObject getObject()

toString

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

getStringOf

public static java.lang.String getStringOf(ObjectType.ObjType type)
Returns the String representation of a given type. When adding a new ObjectType, see the example given within the method below.

Parameters:
type - the ObjectType whose String representation is desired
Returns:
the String representation of the type

getObjectOf

public ComplexObject getObjectOf(ObjectType.ObjType type)
Returns a new object of the given type. When adding a new ObjectType, see the example given within the method below.

Parameters:
type - the type of object of which a new instance is desired
Returns:
a new instantiation of the given object type

getObjTypeOf

public static ObjectType.ObjType getObjTypeOf(java.lang.String type)