com.jme.util
Class JmeType

java.lang.Object
  extended bycom.jme.util.JmeType
Direct Known Subclasses:
MouseButtonStateType, RendererType, WidgetAlignmentType, WidgetBorderLayoutConstraint, WidgetBorderType, WidgetButtonStateType, WidgetFillType, WidgetFlowOrientationType, WidgetOrientationType

public abstract class JmeType
extends java.lang.Object

JmeType JmeType derived classes are used to create strongly typed enumerations. Using a strongly typed enumeration has benefits over using intrinsic types or their wrappers, ie int, boolean, String, etc. For instance, the strongly typed enumeration can only be compared against the same type, no accidental crossover of type comparison. Strongly typed enumerations also allow effective method overloading, performFoo(FooType1 type) has a different signature than performFoo(FooType2 type).

Version:
$Id: JmeType.java,v 1.3 2004/08/02 21:55:37 cep21 Exp $
Author:
Gregg Patton

Field Summary
protected  java.lang.String name
          The name of this JmeType
 
Constructor Summary
protected JmeType(java.lang.String name)
          Creates a new JmeType with the given name.
 
Method Summary
 java.lang.String getName()
          getName returns the name of this jME type
abstract  JmeType getType(java.lang.String name)
          getType returns an instance of the JmeType
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of this JmeType

Constructor Detail

JmeType

protected JmeType(java.lang.String name)
Creates a new JmeType with the given name.

Method Detail

getName

public java.lang.String getName()
getName returns the name of this jME type

Returns:
the name of this jME type

getType

public abstract JmeType getType(java.lang.String name)
getType returns an instance of the JmeType

Parameters:
name - the String representation of the type
Returns:
an instance of the JmeType

toString

public java.lang.String toString()
toString

Returns:
the String representation of the JmeType
See Also:
Object.toString()