public class Unit
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Unit[] |
EMPTY_ARRAY |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Checks to see of an object is equal to this unit
|
int |
getBaseID()
Gets the base ID for this unit
|
Unit |
getBaseUnit()
Gets the base unit associated with this HMM
|
Context |
getContext()
Returns the context for this unit
|
static Unit[] |
getEmptyContext(int size)
Creates and returns an empty context with the given size.
|
java.lang.String |
getName()
Gets the name for this unit
|
int |
hashCode()
calculates a hashCode for this unit.
|
boolean |
isContextDependent()
Determines if this unit is context dependent
|
static boolean |
isContextMatch(Unit[] a,
Unit[] b)
Checks to see that there is 100% overlap in the given contexts
|
boolean |
isFiller()
Determines if this unit is a filler unit
|
boolean |
isPartialMatch(java.lang.String name,
Context context)
Checks to see if the given unit with associated contexts is a partial match for this unit.
|
boolean |
isSilence()
Determines if this unit is the silence unit
|
java.lang.String |
toString()
Converts to a string
|
public static final Unit[] EMPTY_ARRAY
public java.lang.String getName()
public boolean isFiller()
true
if the unit is a filler unitpublic boolean isSilence()
public int getBaseID()
public Unit getBaseUnit()
public Context getContext()
public boolean isContextDependent()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to checkpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isPartialMatch(java.lang.String name, Context context)
name
- the name of the unitcontext
- the context to match againstpublic static Unit[] getEmptyContext(int size)
size
- the size of the context