morfologik.fsa
Enum FSAMatchType

java.lang.Object
  extended by java.lang.Enum<FSAMatchType>
      extended by morfologik.fsa.FSAMatchType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FSAMatchType>

public enum FSAMatchType
extends java.lang.Enum<FSAMatchType>

Type of the match returned as part of FSAMatch.


Enum Constant Summary
EXACT_MATCH
          The input sequence ends exactly on the final node.
NO_MATCH
          No match for the input sequence of symbols found in the automaton.
PREFIX_FOUND
          The sequence ends on an intermediate automaton node.
PREMATURE_PATH_END_FOUND
          A terminating node occurs in the dictionary before the end of the input sequence.
PREMATURE_WORD_END_FOUND
          The input sequence ends on an intermediate automaton node.
 
Method Summary
static FSAMatchType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FSAMatchType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_MATCH

public static final FSAMatchType NO_MATCH
No match for the input sequence of symbols found in the automaton.


EXACT_MATCH

public static final FSAMatchType EXACT_MATCH
The input sequence ends exactly on the final node.


PREMATURE_PATH_END_FOUND

public static final FSAMatchType PREMATURE_PATH_END_FOUND
A terminating node occurs in the dictionary before the end of the input sequence. It effectively means a prefix of the input sequence is stored in the dictionary (e.g., an empty sequence is a prefix of all other sequences). The result FSAMatch will contain an index of the first character not present in the dictionary.


PREFIX_FOUND

public static final FSAMatchType PREFIX_FOUND
The sequence ends on an intermediate automaton node. The sequence is therefore a prefix of at least one other sequence stored in the dictionary. The result FSAMatch object will contain an index of the first character in the input sequence not present in the dictionary and a pointer to the FSA's node where mismatch occurred.


PREMATURE_WORD_END_FOUND

public static final FSAMatchType PREMATURE_WORD_END_FOUND
The input sequence ends on an intermediate automaton node. This is a special case of PREFIX_FOUND. A node where the mismatch (missing input sequence's characters) occurred is returned in the FSAMatch .

Method Detail

values

public static FSAMatchType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FSAMatchType c : FSAMatchType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FSAMatchType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null