hhreco.recognition
Class SimpleData

java.lang.Object
  extended byhhreco.recognition.SimpleData
All Implemented Interfaces:
TypedData

public final class SimpleData
extends java.lang.Object
implements TypedData

An instance of typed data that represents dynamic, user-defined types. If you are writing a low-level recognizer and that recognizes strokes based on a feature vector and knows nothing about the semantics of the recognition, other than a string representation of the type, then this is the class for you (e.g. new SimpleData("scribble")). However, if you have semantic knowledge of the data that is being represented, e.g. the number of sides on the polygon that you just recognized, then you should probably use a statically-typed form of TypedData.

See Also:
Type, TypedData

Field Summary
static Type TYPE
           
 
Constructor Summary
SimpleData()
          Create a SimpleData object without an ID.
SimpleData(java.lang.String typeId)
          Create a SimpleData object and initilize the ID.
 
Method Summary
 Type getType()
          Return the Type of this data.
 java.lang.String getTypeID()
          Return the string ID.
 void init(java.lang.String typeId)
          Initilize the ID.
 java.lang.String toString()
          Return the string ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static Type TYPE
Constructor Detail

SimpleData

public SimpleData()
Create a SimpleData object without an ID.


SimpleData

public SimpleData(java.lang.String typeId)
Create a SimpleData object and initilize the ID.

Method Detail

init

public void init(java.lang.String typeId)
Initilize the ID.


getType

public Type getType()
Return the Type of this data.

Specified by:
getType in interface TypedData

getTypeID

public java.lang.String getTypeID()
Return the string ID.


toString

public java.lang.String toString()
Return the string ID.