T - is the generic type of the Datatype owning this segment.V - is the generic type of the segment value.public interface DatatypeSegmentDescriptor<T,V>
segment. DatatypeSegmentDescriptor for LocalDate.getYear() behaves as described
by the following table:
| Method | Result |
|---|---|
getName() |
"year" |
getType() |
Integer.class |
getSegment(x) |
x.getYear() |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
The default
name for the single segment of
atomic datatypes. |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
V |
getSegment(T datatype)
Gets the value of the segment described by this object.
|
Class<V> |
getType() |
boolean |
isOptional() |
static final String DEFAULT_NAME
name for the single segment of
atomic datatypes.String getName()
SimpleDatatype typically just DEFAULT_NAME but
significant for composite datatypes where the name is used as field names when the datatype is
serialized to XML, JSON, a Map or whatever.boolean isOptional()
true if this segment is optional and can be omitted, false otherwise.
Serialization is suggested to omit optional segments if their value is null.
Further, creation shall accept less arguments if any
number of optional arguments are skipped what requires that
segment descriptors are ordered such that
optional segments are at the end of the list.Copyright © 2001–2015 mmm-Team. All rights reserved.