public class PropertyPath extends Object implements Streamable<PropertyPath>
PropertyPath
of a domain class.Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static PropertyPath |
from(String source,
Class<?> type)
Extracts the
PropertyPath chain from the given source String and type. |
static PropertyPath |
from(String source,
TypeInformation<?> type)
|
PropertyPath |
getLeafProperty()
Returns the leaf property of the
PropertyPath . |
Class<?> |
getLeafType()
Returns the type of the leaf property of the current
PropertyPath . |
TypeInformation<?> |
getOwningType()
Returns the owning type of the
PropertyPath . |
String |
getSegment()
Returns the name of the
PropertyPath . |
Class<?> |
getType()
|
TypeInformation<?> |
getTypeInformation() |
int |
hashCode() |
boolean |
hasNext()
Returns whether there is a nested
PropertyPath . |
boolean |
isCollection()
Returns whether the
PropertyPath is actually a collection. |
Iterator<PropertyPath> |
iterator() |
PropertyPath |
nested(String path)
Returns the
PropertyPath for the path nested under the current property. |
PropertyPath |
next()
Returns the next nested
PropertyPath . |
String |
toDotPath()
Returns the
PropertyPath in dot notation. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream
forEach, spliterator
public TypeInformation<?> getOwningType()
PropertyPath
.public String getSegment()
PropertyPath
.public PropertyPath getLeafProperty()
PropertyPath
.public Class<?> getLeafType()
PropertyPath
.public Class<?> getType()
Iterable
or the value type of a Map
if the property is one.@Nullable public PropertyPath next()
PropertyPath
.PropertyPath
or null if no nested PropertyPath
available.hasNext()
public boolean hasNext()
PropertyPath
. If this returns true you can expect
next()
to return a non- null value.public String toDotPath()
PropertyPath
in dot notation.public boolean isCollection()
PropertyPath
is actually a collection.public PropertyPath nested(String path)
PropertyPath
for the path nested under the current property.path
- must not be null or empty.public Iterator<PropertyPath> iterator()
iterator
in interface Iterable<PropertyPath>
public static PropertyPath from(String source, Class<?> type)
PropertyPath
chain from the given source String
and type.source
- type
- public static PropertyPath from(String source, TypeInformation<?> type)
PropertyPath
chain from the given source String
and TypeInformation
. SPLITTER
by default and SPLITTER_FOR_QUOTED
for quoted
literals.source
- must not be null.type
- protected boolean canEqual(Object other)
public TypeInformation<?> getTypeInformation()
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.