com.ibm.icu.util
Enum BytesTrie.Result

java.lang.Object
  extended by java.lang.Enum<BytesTrie.Result>
      extended by com.ibm.icu.util.BytesTrie.Result
All Implemented Interfaces:
Serializable, Comparable<BytesTrie.Result>
Enclosing class:
BytesTrie

public static enum BytesTrie.Result
extends Enum<BytesTrie.Result>

Return values for BytesTrie.next(), CharsTrie.next() and similar methods.

Status:
Draft ICU 4.8.

Enum Constant Summary
FINAL_VALUE
          The input unit(s) continued a matching string and there is a value for the string so far.
INTERMEDIATE_VALUE
          The input unit(s) continued a matching string and there is a value for the string so far.
NO_MATCH
          The input unit(s) did not continue a matching string.
NO_VALUE
          The input unit(s) continued a matching string but there is no value for the string so far.
 
Method Summary
 boolean hasNext()
          Equivalent to (result==NO_VALUE || result==INTERMEDIATE_VALUE).
 boolean hasValue()
          Equivalent to (result==INTERMEDIATE_VALUE || result==FINAL_VALUE).
 boolean matches()
          Same as (result!
static BytesTrie.Result valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BytesTrie.Result[] 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 BytesTrie.Result NO_MATCH
The input unit(s) did not continue a matching string. Once current()/next() return NO_MATCH, all further calls to current()/next() will also return NO_MATCH, until the trie is reset to its original state or to a saved state.

Status:
Draft ICU 4.8.

NO_VALUE

public static final BytesTrie.Result NO_VALUE
The input unit(s) continued a matching string but there is no value for the string so far. (It is a prefix of a longer string.)

Status:
Draft ICU 4.8.

FINAL_VALUE

public static final BytesTrie.Result FINAL_VALUE
The input unit(s) continued a matching string and there is a value for the string so far. This value will be returned by getValue(). No further input byte/unit can continue a matching string.

Status:
Draft ICU 4.8.

INTERMEDIATE_VALUE

public static final BytesTrie.Result INTERMEDIATE_VALUE
The input unit(s) continued a matching string and there is a value for the string so far. This value will be returned by getValue(). Another input byte/unit can continue a matching string.

Status:
Draft ICU 4.8.
Method Detail

values

public static BytesTrie.Result[] 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 (BytesTrie.Result c : BytesTrie.Result.values())
    System.out.println(c);

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

valueOf

public static BytesTrie.Result valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

matches

public boolean matches()
Same as (result!=NO_MATCH).

Returns:
true if the input bytes/units so far are part of a matching string/byte sequence.
Status:
Draft ICU 4.8.

hasValue

public boolean hasValue()
Equivalent to (result==INTERMEDIATE_VALUE || result==FINAL_VALUE).

Returns:
true if there is a value for the input bytes/units so far.
See Also:
BytesTrie.getValue()
Status:
Draft ICU 4.8.

hasNext

public boolean hasNext()
Equivalent to (result==NO_VALUE || result==INTERMEDIATE_VALUE).

Returns:
true if another input byte/unit can continue a matching string.
Status:
Draft ICU 4.8.


Copyright (c) 2011 IBM Corporation and others.