Package top.focess.util.option.type
Class IntegerOptionType
- java.lang.Object
-
- top.focess.util.option.type.OptionType<T>
-
- top.focess.util.option.type.ExceptionOptionType<Integer>
-
- top.focess.util.option.type.IntegerOptionType
-
public class IntegerOptionType extends ExceptionOptionType<Integer>
Accept Integer type option.
-
-
Field Summary
Fields Modifier and Type Field Description static IntegerOptionTypeINTEGER_OPTION_TYPESingle Instance for IntegerOptionType-
Fields inherited from class top.focess.util.option.type.OptionType
DEFAULT_OPTION_TYPE
-
-
Constructor Summary
Constructors Constructor Description IntegerOptionType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integerparse(String v)Parse the value to the target type.StringtoString()-
Methods inherited from class top.focess.util.option.type.ExceptionOptionType
accept
-
-
-
-
Field Detail
-
INTEGER_OPTION_TYPE
public static final IntegerOptionType INTEGER_OPTION_TYPE
Single Instance for IntegerOptionType
-
-
Method Detail
-
parse
public Integer parse(String v)
Description copied from class:OptionTypeParse the value to the target type. Note: called only whenOptionType.accept(String)return true.- Specified by:
parsein classOptionType<Integer>- Parameters:
v- the value- Returns:
- the target type
-
-