T
- is the generic type of the described Datatype
.@ComponentSpecification(plugin=true) public interface DatatypeDescriptor<T>
Datatype
. Allows to disassemble
a (composite) datatype into its segments as well as to assemble
a
Datatype
from its segments.Modifier and Type | Method and Description |
---|---|
T |
create(Object... segments)
|
Class<T> |
getDatatype() |
Object |
getSegment(T datatype,
int index)
Gets a single segment of the given
Datatype . |
List<DatatypeSegmentDescriptor<T,?>> |
getSegmentDescriptors()
|
List<DatatypeSegmentDescriptor<T,?>> getSegmentDescriptors()
List
of DatatypeSegmentDescriptor
s the described datatype
is composed of. LocalDate
is composed out of three segments all of the
type
Integer
: year, month, and day.List
of DatatypeSegmentDescriptor
s.Object getSegment(T datatype, int index)
Datatype
.datatype
- is the Datatype
instance to disassemble.index
- is the index of the segment to retrieve. Has to correspond to the list
index
of segment descriptors
.DatatypeSegmentDescriptor.getType()
.getSegmentDescriptors()
T create(Object... segments)
segments
- are the segment values
in the order given by
getSegmentDescriptors()
. Optional
segments
may be omitted (from the end of the list). The type of each segment has to match the corresponding
segment type
.Copyright © 2001–2014 mmm-Team. All rights reserved.