Class ExceptionDataConverter<T>
- java.lang.Object
-
- top.focess.qq.api.command.DataConverter<T>
-
- top.focess.qq.api.command.converter.ExceptionDataConverter<T>
-
- Type Parameters:
T- the target type
public abstract class ExceptionDataConverter<T> extends DataConverter<T>
Simplify theDataConverterclass. Implement the accept method. The accept method returns true if there is no exception in converting the String argument, false otherwise.
-
-
Field Summary
-
Fields inherited from class top.focess.qq.api.command.DataConverter
BOOLEAN_DATA_CONVERTER, DEFAULT_DATA_CONVERTER, DOUBLE_DATA_CONVERTER, DOUBLE_PREDICATE, INTEGER_DATA_CONVERTER, INTEGER_PREDICATE, LONG_DATA_CONVERTER, LONG_PREDICATE
-
-
Constructor Summary
Constructors Constructor Description ExceptionDataConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaccept(String arg)Indicate whether this String argument is this target type or not-
Methods inherited from class top.focess.qq.api.command.DataConverter
convert, getTargetClass
-
-
-
-
Method Detail
-
accept
protected boolean accept(String arg)
Description copied from class:DataConverterIndicate whether this String argument is this target type or not- Specified by:
acceptin classDataConverter<T>- Parameters:
arg- the target argument in String- Returns:
- true if this String argument can convert to this target type, false otherwise
-
-