Package ch.tocco.nice2.types.spi
Class AbstractTypeHandler<T>
java.lang.Object
ch.tocco.nice2.types.spi.AbstractTypeHandler<T>
- All Implemented Interfaces:
TypeHandler<T>
- Direct Known Subclasses:
AbstractComparableTypeHandler
,BinaryTypeHandler
,CoordinateTypeHandler
,CustomTypeHandler
,GlobTypeHandler
,PasswordTypeHandler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Should primarily be used for ordering instead of equality as some implementations are case-insensitive.boolean
void
init
(TypeHandler<T> base, Type<T> type) boolean
boolean
boolean
boolean
boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.types.spi.TypeHandler
asObject, getEmptyValue, getGenerationType, isChronological, isNumeric
-
Field Details
-
baseHandler
-
type
-
-
Constructor Details
-
AbstractTypeHandler
public AbstractTypeHandler()
-
-
Method Details
-
init
- Specified by:
init
in interfaceTypeHandler<T>
-
asString
- Specified by:
asString
in interfaceTypeHandler<T>
-
isolate
- Specified by:
isolate
in interfaceTypeHandler<T>
-
validate
- Specified by:
validate
in interfaceTypeHandler<T>
- Throws:
ValidationException
- See Also:
-
isEqual
- Specified by:
isEqual
in interfaceTypeHandler<T>
- Returns:
- true if both values are equal
-
compare
Description copied from interface:TypeHandler
Should primarily be used for ordering instead of equality as some implementations are case-insensitive.- Specified by:
compare
in interfaceTypeHandler<T>
-
matches
- Specified by:
matches
in interfaceTypeHandler<T>
-
contains
- Specified by:
contains
in interfaceTypeHandler<T>
-
isBoolean
public boolean isBoolean()- Specified by:
isBoolean
in interfaceTypeHandler<T>
- See Also:
-
shouldBeUnique
public boolean shouldBeUnique()- Specified by:
shouldBeUnique
in interfaceTypeHandler<T>
- See Also:
-