Class NullDataConverter<T>
- java.lang.Object
-
- top.focess.qq.api.command.DataConverter<T>
-
- top.focess.qq.api.command.converter.NullDataConverter<T>
-
- Type Parameters:
T- the target type
- Direct Known Subclasses:
CommandDataConverter,PluginDataConverter
public abstract class NullDataConverter<T> extends DataConverter<T>
Simplify theDataConverterclass. Implement the accept method. The accept method returns true if the result of converting the String argument is not null, 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 NullDataConverter()
-
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
connect, 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
-
-