Package com.enonic.xp.data
Class PropertyPath
- java.lang.Object
-
- com.enonic.xp.data.PropertyPath
-
- All Implemented Interfaces:
java.lang.Iterable<PropertyPath.Element>
@PublicApi public final class PropertyPath extends java.lang.Object implements java.lang.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 java.lang.String
ELEMENT_DIVIDER
static PropertyPath
ROOT
-
Method Summary
-
-
-
Field Detail
-
ROOT
public static final PropertyPath ROOT
-
ELEMENT_DIVIDER
public static final java.lang.String ELEMENT_DIVIDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
from
public static PropertyPath from(PropertyPath parentPath, java.lang.String element)
-
from
public static PropertyPath from(PropertyPath parentPath, PropertyPath.Element element)
-
from
public static PropertyPath from(java.lang.Iterable<PropertyPath.Element> pathElements)
-
from
public static PropertyPath from(java.lang.String path)
-
from
public static PropertyPath from(java.lang.String parentPath, java.lang.String... children)
-
from
public static PropertyPath from(PropertyPath.Element... pathElements)
-
getParent
public PropertyPath getParent()
-
isRelative
public boolean isRelative()
-
resolvePathElementNames
public java.lang.Iterable<java.lang.String> resolvePathElementNames()
-
elementCount
public int elementCount()
-
iterator
public java.util.Iterator<PropertyPath.Element> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<PropertyPath.Element>
-
pathElements
public com.google.common.collect.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)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-