public class ItemName extends QName implements ItemPath
ItemPath.CompareResult
EMPTY_PATH
Constructor and Description |
---|
ItemName(QName name) |
ItemName(String localPart) |
ItemName(String namespaceURI,
String localPart) |
ItemName(String namespaceURI,
String localPart,
String prefix) |
Modifier and Type | Method and Description |
---|---|
ItemPath |
allExceptLast()
Returns all segments except the last one.
|
QName |
asSingleName()
If the path consists of a single name segment (not variable nor special symbol), returns the corresponding value.
|
Object |
first()
Returns the first segment or null if the path is empty.
|
ItemPath |
firstAsPath()
Returns the first segment as an ItemPath.
|
Long |
firstToIdOrNull()
Returns the value of the first segment if it is a Id segment; otherwise null.
|
static ItemName |
fromQName(QName name) |
Object |
getSegment(int i)
Returns the given path segment.
|
List<?> |
getSegments()
Returns the path segments.
|
boolean |
isEmpty()
Returns true if the path is empty i.e.
|
boolean |
isSingleName()
Returns true if the path consists of a single name segment.
|
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.
|
ItemPath |
namedSegmentsOnly()
Returns the path containing only the regular named segments.
|
ItemPath |
removeIds()
Returns the path with no Id segments.
|
ItemPath |
rest()
Returns the rest of the path (the tail).
|
ItemPath |
rest(int n)
Returns the rest of the path (the tail), starting at position "n".
|
void |
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.
|
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() |
equals, getLocalPart, getNamespaceURI, getPrefix, hashCode, valueOf
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allUpToIncluding, allUpToLastName, append, asSingleNameOrFail, checkNoSpecialSymbols, checkNoSpecialSymbolsExceptParent, compareComplex, containsNameExactly, containsSpecialSymbols, containsSpecialSymbolsExceptParent, create, create, createReverse, emptyIfNull, equals, equivalent, equivalent, firstName, firstNameIndex, firstNameOrFail, firstToId, firstToIdOrNull, firstToName, firstToNameOrNull, firstToNameOrNull, firstToVariableNameOrNull, isEmpty, isId, isIdentifier, isName, isNullId, isObjectReference, isParent, isSpecial, isSubPath, isSubPathOrEquivalent, isSuperPath, isSuperPathOrEquivalent, isVariable, lastNameIndex, remainder, segmentsEquivalent, startsWith, startsWithId, startsWithIdentifier, startsWithName, startsWithName, startsWithNullId, startsWithObjectReference, startsWithParent, startsWithVariable, stripVariableSegment, toId, toIdOrNull, toName, toNameNullSafe, toNameOrNull, toVariableName
shortDump, shortDumpLazily
public ItemName(String localPart)
public ItemName(@NotNull QName name)
public boolean isEmpty()
ItemPath
@NotNull public List<?> getSegments()
ItemPath
getSegments
in interface ItemPath
public Object getSegment(int i)
ItemPath
getSegment
in interface ItemPath
public int size()
ItemPath
public Object first()
ItemPath
@NotNull public ItemPath rest()
ItemPath
@NotNull public ItemPath rest(int n)
ItemPath
public Long firstToIdOrNull()
ItemPath
firstToIdOrNull
in interface ItemPath
@NotNull public ItemPath namedSegmentsOnly()
ItemPath
namedSegmentsOnly
in interface ItemPath
@NotNull public ItemPath removeIds()
ItemPath
public QName asSingleName()
ItemPath
asSingleName
in interface ItemPath
public boolean isSingleName()
ItemPath
isSingleName
in interface ItemPath
public ItemName lastName()
ItemPath
public Object last()
ItemPath
public ItemPath firstAsPath()
ItemPath
firstAsPath
in interface ItemPath
@NotNull public ItemPath allExceptLast()
ItemPath
allExceptLast
in interface ItemPath
public void shortDump(StringBuilder sb)
ShortDumpable
shortDump
in interface ItemPath
shortDump
in interface ShortDumpable
sb
- StringBuilder to which to a compact one-line content of the object intended
for diagnostics by system administrator should be appended.Copyright © 2019 Evolveum. All rights reserved.