T - Type of the element identified by this pathpublic interface Path<T> extends TypedExpression<T>, DataMappable, Serializable
String name.
If the path belongs to a hierarchical structure, the parent path can be provided using getParent().
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Path.Builder<T,B extends Path.Builder<T,B>>
Base path builder.
|
static interface |
Path.FinalPath<T>
Represents a final path, i.e. a path which do not support any parent path.
|
static interface |
Path.PathBuilder<T>
Path builder.
|
Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException| Modifier and Type | Field and Description |
|---|---|
static char |
PATH_HIERARCHY_SEPARATOR
Separator character used as separator between path hierarchy elements when composing or parsing a path name.
|
DEFAULT_CONFIG_PROPERTY_PREFIX, PATH| Modifier and Type | Method and Description |
|---|---|
default String |
fullName()
Gets the path full name, including any parent path, separated by a dot
. |
default String |
fullName(Function<Path<?>,String> nameMapper)
Gets the path full name, including any parent path, separated by a dot
. |
String |
getName()
Gets the path name
|
Optional<Path<?>> |
getParent()
Gets the parent path
|
default boolean |
isRootPath()
Checks whether this path is a root path, i.e. it has no parent path.
|
static <T> Path.PathBuilder<T> |
of(String name,
Class<? extends T> type)
|
default String |
relativeName()
Gets the relative path name, separated by a dot
. |
default String |
relativeName(Function<Path<?>,String> nameMapper)
Gets the relative path name, separated by a dot
. |
default Stream<Path<?>> |
stream()
Returns a
Stream of path hierarchy, starting form this path and walking through parent paths, if any. |
getTemporalType, getType, isCollectionExpression, isConverterExpressionvalidategetDataPath, isDataMappablestatic final char PATH_HIERARCHY_SEPARATOR
String getName()
Optional<Path<?>> getParent()
default boolean isRootPath()
true if it is a root path, false otherwisedefault Stream<Path<?>> stream()
Stream of path hierarchy, starting form this path and walking through parent paths, if any.default String fullName()
. character.default String fullName(Function<Path<?>,String> nameMapper)
. character.nameMapper - The function to use to obtain the path name (not null)default String relativeName()
. character, i.e. exclude any
Path.FinalPath path instance from path name composition.Path.FinalPath itself.default String relativeName(Function<Path<?>,String> nameMapper)
. character, i.e. exclude any
Path.FinalPath path instance from path name composition.nameMapper - The function to use to obtain the path name (not null)Path.FinalPath itself.static <T> Path.PathBuilder<T> of(String name, Class<? extends T> type)
Path implementation with given name and type.
The returned type is a Path instance implementing also Path.Builder to provide instance configuration
methods.
T - Path typename - Path name (not null)type - Path type (not null)Copyright © 2019 The Holon Platform. All rights reserved.