edu.cmu.sphinx.linguist.acoustic
Class Context

java.lang.Object
  extended byedu.cmu.sphinx.linguist.acoustic.Context
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LeftRightContext

public class Context
extends java.lang.Object
implements java.io.Serializable

Represents the context for a unit

See Also:
Serialized Form

Field Summary
static Context EMPTY_CONTEXT
          Represents an empty context
 
Method Summary
 boolean equals(java.lang.Object o)
          Determines if an object is equal to this context
 int hashCode()
          calculates a hashCode for this context.
 boolean isPartialMatch(Context context)
          Checks to see if there is a partial match with the given context.
 java.lang.String toString()
          Provides a string representation of a context
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_CONTEXT

public static final Context EMPTY_CONTEXT
Represents an empty context

Method Detail

isPartialMatch

public boolean isPartialMatch(Context context)
Checks to see if there is a partial match with the given context. For a simple context such as this we always match.

Parameters:
context - the context to check
Returns:
true if there is a partial match

toString

public java.lang.String toString()
Provides a string representation of a context


equals

public boolean equals(java.lang.Object o)
Determines if an object is equal to this context

Parameters:
o - the object to check
Returns:
true if the objects are equal

hashCode

public int hashCode()
calculates a hashCode for this context. Since we defined an equals for context, we must define a hashCode as well

Returns:
the hashcode for this object