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 classPropertyPath.ElementImmutable.
-
Field Summary
Fields Modifier and Type Field Description static StringELEMENT_DIVIDERstatic PropertyPathROOT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intelementCount()booleanequals(Object o)static PropertyPathfrom(PropertyPath.Element... pathElements)static PropertyPathfrom(PropertyPath parentPath, PropertyPath.Element element)static PropertyPathfrom(PropertyPath parentPath, String element)static PropertyPathfrom(Iterable<PropertyPath.Element> pathElements)static PropertyPathfrom(String path)static PropertyPathfrom(String parentPath, String... children)PropertyPath.ElementgetFirstElement()PropertyPath.ElementgetLastElement()PropertyPathgetParent()inthashCode()booleanisRelative()Iterator<PropertyPath.Element>iterator()ImmutableList<PropertyPath.Element>pathElements()PropertyPathremoveFirstPathElement()PropertyPathremoveIndexFromLastElement()PropertyPathresetAllIndexesTo(int index)Iterable<String>resolvePathElementNames()booleanstartsWith(PropertyPath path)StringtoString()-
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:
iteratorin 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)
-
-