Package top.focess.util.option.type
Class ExceptionOptionType<T>
- java.lang.Object
-
- top.focess.util.option.type.OptionType<T>
-
- top.focess.util.option.type.ExceptionOptionType<T>
-
- Type Parameters:
T- the target type
- Direct Known Subclasses:
IntegerOptionType,LongOptionType
public abstract class ExceptionOptionType<T> extends OptionType<T>
Simplify theOptionTypeclass. Implement the accept method. The accept method returns true if there is no exception in parsing the String argument, false otherwise.
-
-
Field Summary
-
Fields inherited from class top.focess.util.option.type.OptionType
DEFAULT_OPTION_TYPE
-
-
Constructor Summary
Constructors Constructor Description ExceptionOptionType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(String v)Indicate whether this type can accept the value.-
Methods inherited from class top.focess.util.option.type.OptionType
parse
-
-
-
-
Method Detail
-
accept
public boolean accept(String v)
Description copied from class:OptionTypeIndicate whether this type can accept the value.- Specified by:
acceptin classOptionType<T>- Parameters:
v- the value- Returns:
- true if can accept, false otherwise
-
-