Package com.evolveum.midpoint.prism.path
Class ItemPathImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.path.ItemPathImpl
-
- All Implemented Interfaces:
ItemPath
,ShortDumpable
,Serializable
public final class ItemPathImpl extends Object implements ItemPath
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.path.ItemPath
ItemPath.CompareResult
-
-
Field Summary
Fields Modifier and Type Field Description static ItemPath
EMPTY_PATH
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ItemPath
allExceptLast()
Returns all segments except the last one.boolean
equals(Object o)
Object
first()
Returns the first segment or null if the path is empty.ItemPath
firstAsPath()
Returns the first segment as an ItemPath.Object
getSegment(int i)
Returns the given path segment.@NotNull List<?>
getSegments()
Returns the path segments.int
hashCode()
boolean
isEmpty()
Returns true if the path is empty i.e.Object
last()
Returns the last segment (or null if the path is empty).ItemName
lastName()
Returns the last name segment value; or null if there's no name segment.@NotNull ItemPath
namedSegmentsOnly()
Returns the path containing only the regular named segments.@NotNull ItemPath
removeIds()
Returns the path with no Id segments.@NotNull ItemPath
rest()
Returns the rest of the path (the tail).@NotNull ItemPath
rest(int n)
Returns the rest of the path (the tail), starting at position "n".int
size()
Returns path size i.e.ItemPath
subPath(int from, int to)
Returns a sub-path from (including) to (excluding) given indices.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.path.ItemPath
allUpToIncluding, allUpToLastName, append, asSingleName, asSingleNameOrFail, compareComplex, containsNameExactly, containsSpecialSymbols, containsSpecialSymbolsExceptParent, equals, equivalent, firstName, firstNameIndex, firstNameOrFail, firstToId, firstToIdOrNull, firstToName, firstToNameOrNull, firstToVariableNameOrNull, isSingleName, isSubPath, isSubPathOrEquivalent, isSuperPath, isSuperPathOrEquivalent, lastNameIndex, remainder, shortDump, startsWith, startsWithId, startsWithIdentifier, startsWithName, startsWithName, startsWithNullId, startsWithObjectReference, startsWithParent, startsWithVariable, stripVariableSegment
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Field Detail
-
EMPTY_PATH
public static final ItemPath EMPTY_PATH
-
-
Method Detail
-
getSegments
@NotNull public @NotNull List<?> getSegments()
Description copied from interface:ItemPath
Returns the path segments. Avoid using this method and access segments directly. Instead try to find suitable method in ItemPath interface. NEVER change path content using this method. TODO consider returning unmodifiable collection here (beware of performance implications)- Specified by:
getSegments
in interfaceItemPath
-
isEmpty
public boolean isEmpty()
Description copied from interface:ItemPath
Returns true if the path is empty i.e. has no components.
-
size
public int size()
Description copied from interface:ItemPath
Returns path size i.e. the number of components.
-
first
public Object first()
Description copied from interface:ItemPath
Returns the first segment or null if the path is empty.
-
rest
@NotNull public @NotNull ItemPath rest()
Description copied from interface:ItemPath
Returns the rest of the path (the tail).
-
rest
@NotNull public @NotNull ItemPath rest(int n)
Description copied from interface:ItemPath
Returns the rest of the path (the tail), starting at position "n".
-
namedSegmentsOnly
@NotNull public @NotNull ItemPath namedSegmentsOnly()
Description copied from interface:ItemPath
Returns the path containing only the regular named segments.- Specified by:
namedSegmentsOnly
in interfaceItemPath
-
removeIds
@NotNull public @NotNull ItemPath removeIds()
Description copied from interface:ItemPath
Returns the path with no Id segments.
-
lastName
public ItemName lastName()
Description copied from interface:ItemPath
Returns the last name segment value; or null if there's no name segment.
-
last
public Object last()
Description copied from interface:ItemPath
Returns the last segment (or null if the path is empty).
-
firstAsPath
public ItemPath firstAsPath()
Description copied from interface:ItemPath
Returns the first segment as an ItemPath. TODO consider the necessity of such method- Specified by:
firstAsPath
in interfaceItemPath
-
subPath
public ItemPath subPath(int from, int to)
Description copied from interface:ItemPath
Returns a sub-path from (including) to (excluding) given indices.
-
allExceptLast
@NotNull public @NotNull ItemPath allExceptLast()
Description copied from interface:ItemPath
Returns all segments except the last one.- Specified by:
allExceptLast
in interfaceItemPath
-
getSegment
public Object getSegment(int i)
Description copied from interface:ItemPath
Returns the given path segment.- Specified by:
getSegment
in interfaceItemPath
-
-