public interface HasOrdinalPosition extends Document
Document
implementations that implement the
getOrdinalPosition()
method.Modifier and Type | Field and Description |
---|---|
static Comparator<HasOrdinalPosition> |
COMPARATOR
The default
Comparator used for documents that implement the
HasOrdinalPosition trait. |
static String |
ORDINAL_POSITION
The key of the
ordinalPosition property. |
Modifier and Type | Method and Description |
---|---|
default int |
getOrdinalPosition()
Returns the position to use when ordering this node.
|
static HasOrdinalPosition |
of(Document document)
Returns a wrapper of the specified document that implements the
HasOrdinalPosition trait. |
ancestors, children, children, get, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getData, getParent, put
static final String ORDINAL_POSITION
ordinalPosition
property.static final Comparator<HasOrdinalPosition> COMPARATOR
Comparator
used for documents that implement the
HasOrdinalPosition
trait. This will simply order the elements
based on the natural ordering of their getOrdinalPosition()
result.default int getOrdinalPosition()
static HasOrdinalPosition of(Document document)
HasOrdinalPosition
trait. If the specified document already
implements the trait, it is returned unwrapped.document
- the document to wrapCopyright © 2017 Speedment, Inc.. All rights reserved.