T - the underlying data type of the valuespublic interface ValueType<T> extends DBObject
Attributes and
Series. Value types can be provided by the system or can be defined
procedurally with a ValueScanner.| Modifier and Type | Interface and Description |
|---|---|
static class |
ValueType.StandardValueType
StandardValueType provides an easy way to identify built-in value types.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(T value)
Check that the value is allowed.
|
UpdatableValueType<T> |
edit()
Return an
UpdatableValueType corresponding to this value type. |
String |
getExternalRepresentation()
Return a string providing an external representation of the value type.
|
String |
getName()
Return the name of the value type.
|
ValueScanner<T> |
getScanner()
Return the value scanner.
|
ValueType.StandardValueType |
getStandardValueType()
Return the constant representing the value type when it is a built-in value type.
|
Class<T> |
getType()
Return the class of the underlying data type.
|
Map<T,String> |
getValueDescriptions()
Return a map with allowed values as keys and a description for each
value.
|
Set<T> |
getValues()
Return the set of allowed values.
|
Collection<String> |
getValues(String format)
Return values and descriptions as a collection of formatted strings.
|
boolean |
isBuiltIn()
Deprecated.
|
boolean |
isCompatible(Object obj)
Returns true if the object can be assigned to a variable of the
underlying data type.
|
boolean |
isRestricted()
Return true if the value type maintains an exhaustive list of allowed values.
|
T |
scan(String value)
Convert the argument to an object of the underlying data type.
|
String |
toString(Object value)
Convert the argument to a string.
|
<S> ValueType<S> |
typeCheck(Class<S> type)
Cast the value type to the type specified.
|
getDatabase, getId, getSurrogate, inConstruction, isValidString getName()
boolean isRestricted()
@Deprecated boolean isBuiltIn()
Class<T> getType()
ValueScanner<T> getScanner()
ValueType.StandardValueType getStandardValueType()
String getExternalRepresentation()
Set<T> getValues()
T2DBExceptionMap<T,String> getValueDescriptions()
T2DBExceptionCollection<String> getValues(String format)
format - a formatT scan(String value) throws T2DBException
value - a stringT2DBExceptionboolean isCompatible(Object obj)
check(T) for that.obj - an objectvoid check(T value) throws T2DBException
value - a valueT2DBExceptionString toString(Object value) throws T2DBException
value - a valueT2DBExceptionUpdatableValueType<T> edit()
UpdatableValueType corresponding to this value type.
Successfully getting an Updatable object does not imply
that updates can be successfully applied.<S> ValueType<S> typeCheck(Class<S> type) throws T2DBException
type - the underlying type requiredT2DBExceptionCopyright © 2017. All rights reserved.