Package com.enonic.xp.data
Class PropertyPath
- java.lang.Object
-
- com.enonic.xp.data.PropertyPath
-
- All Implemented Interfaces:
Iterable<PropertyPath.Element>
@PublicApi public final class PropertyPath extends Object implements Iterable<PropertyPath.Element>
Immutable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyPath.Element
Immutable.
-
Field Summary
Fields Modifier and Type Field Description static String
ELEMENT_DIVIDER
static PropertyPath
ROOT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
elementCount()
boolean
equals(Object o)
static PropertyPath
from(PropertyPath.Element... pathElements)
static PropertyPath
from(PropertyPath parentPath, PropertyPath.Element element)
static PropertyPath
from(PropertyPath parentPath, String element)
static PropertyPath
from(Iterable<PropertyPath.Element> pathElements)
static PropertyPath
from(String path)
static PropertyPath
from(String parentPath, String... children)
PropertyPath.Element
getFirstElement()
PropertyPath.Element
getLastElement()
PropertyPath
getParent()
int
hashCode()
boolean
isRelative()
Iterator<PropertyPath.Element>
iterator()
ImmutableList<PropertyPath.Element>
pathElements()
PropertyPath
removeFirstPathElement()
PropertyPath
removeIndexFromLastElement()
PropertyPath
resetAllIndexesTo(int index)
Iterable<String>
resolvePathElementNames()
boolean
startsWith(PropertyPath path)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
ROOT
public static final PropertyPath ROOT
-
ELEMENT_DIVIDER
public static final String ELEMENT_DIVIDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
from
public static PropertyPath from(PropertyPath parentPath, String element)
-
from
public static PropertyPath from(PropertyPath parentPath, PropertyPath.Element element)
-
from
public static PropertyPath from(Iterable<PropertyPath.Element> pathElements)
-
from
public static PropertyPath from(String path)
-
from
public static PropertyPath from(String parentPath, String... children)
-
from
public static PropertyPath from(PropertyPath.Element... pathElements)
-
getParent
public PropertyPath getParent()
-
isRelative
public boolean isRelative()
-
elementCount
public int elementCount()
-
iterator
public Iterator<PropertyPath.Element> iterator()
- Specified by:
iterator
in interfaceIterable<PropertyPath.Element>
-
pathElements
public ImmutableList<PropertyPath.Element> pathElements()
-
getFirstElement
public PropertyPath.Element getFirstElement()
-
getLastElement
public PropertyPath.Element getLastElement()
-
startsWith
public boolean startsWith(PropertyPath path)
-
removeFirstPathElement
public PropertyPath removeFirstPathElement()
-
removeIndexFromLastElement
public PropertyPath removeIndexFromLastElement()
-
resetAllIndexesTo
public PropertyPath resetAllIndexesTo(int index)
-
-