Package org.lionsoul.jcseg
Enum ISegment.Type
- java.lang.Object
-
- java.lang.Enum<ISegment.Type>
-
- org.lionsoul.jcseg.ISegment.Type
-
- All Implemented Interfaces:
Serializable,Comparable<ISegment.Type>
- Enclosing interface:
- ISegment
public static enum ISegment.Type extends Enum<ISegment.Type>
-
-
Field Summary
Fields Modifier and Type Field Description SegmenterFunctionfactoryintindexstatic ISegment.Type[]MAPPINGthe type index and type mapping for quick get the type by type index number.Stringname
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ISegment.TypefromIndex(int index)static ISegment.TypefromString(String type)static ISegment.TypefromString(String type, ISegment.Type defaultValue)get the Type with the specified string namestatic ISegment.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static ISegment.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIMPLE
public static final ISegment.Type SIMPLE
-
COMPLEX
public static final ISegment.Type COMPLEX
-
DETECT
public static final ISegment.Type DETECT
-
MOST
public static final ISegment.Type MOST
-
NLP
public static final ISegment.Type NLP
-
DELIMITER
public static final ISegment.Type DELIMITER
-
NGRAM
public static final ISegment.Type NGRAM
-
-
Field Detail
-
name
public final String name
-
index
public final int index
-
factory
public final SegmenterFunction factory
-
MAPPING
public static final ISegment.Type[] MAPPING
the type index and type mapping for quick get the type by type index number.
-
-
Method Detail
-
values
public static ISegment.Type[] 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 (ISegment.Type c : ISegment.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ISegment.Type 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 nameNullPointerException- if the argument is null
-
fromString
public static ISegment.Type fromString(String type, ISegment.Type defaultValue)
get the Type with the specified string name- Parameters:
type- (All lowercase string)- Returns:
- Type
-
fromString
public static ISegment.Type fromString(String type)
-
fromIndex
public static ISegment.Type fromIndex(int index)
-
-