edu.cmu.sphinx.tools.gui.util
Class PropertyType

java.lang.Object
  extended by edu.cmu.sphinx.tools.gui.util.PropertyType

public abstract class PropertyType
extends java.lang.Object

an enum-style type that defines the possible property types.


Field Summary
static PropertyType BOOLEAN
          An integer type
static PropertyType COMPONENT
          A String type
static PropertyType COMPONENT_LIST
          An array of components
static PropertyType DOUBLE
          A floating point type
static PropertyType FLOAT
          A floating point type
static PropertyType INT
          An integer type
static PropertyType RESOURCE
          A Resource type.
static PropertyType STRING
          A String type
static PropertyType STRING_LIST
          An array of strings
 
Method Summary
abstract  boolean isValid(java.lang.Object obj)
          Determines if the given object can be converted to this type.
static PropertyType toPropertyType(java.lang.String type)
          convert from String to a PropertyType
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INT

public static final PropertyType INT
An integer type


BOOLEAN

public static final PropertyType BOOLEAN
An integer type


FLOAT

public static final PropertyType FLOAT
A floating point type


DOUBLE

public static final PropertyType DOUBLE
A floating point type


COMPONENT

public static final PropertyType COMPONENT
A String type


COMPONENT_LIST

public static final PropertyType COMPONENT_LIST
An array of components


STRING

public static final PropertyType STRING
A String type


RESOURCE

public static final PropertyType RESOURCE
A Resource type. Resources are in one of the following forms:


STRING_LIST

public static final PropertyType STRING_LIST
An array of strings

Method Detail

toPropertyType

public static PropertyType toPropertyType(java.lang.String type)
convert from String to a PropertyType

Parameters:
type -
Returns:
PropertyType of the string

toString

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

isValid

public abstract boolean isValid(java.lang.Object obj)
Determines if the given object can be converted to this type. For non-array types this is String. For array types (String Array) this a String[].

Parameters:
obj - the object to verify
Returns:
true if the object can be converted to an object of this type.