Interface UniformItemPath

    • Method Detail

      • getSegments

        @NotNull
        @NotNull List<ItemPathSegment> 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 interface ItemPath
      • rest

        @NotNull
        default @NotNull UniformItemPath rest()
        Description copied from interface: ItemPath
        Returns the rest of the path (the tail).
        Specified by:
        rest in interface ItemPath
      • last

        @Nullable
        @Nullable ItemPathSegment last()
        Description copied from interface: ItemPath
        Returns the last segment (or null if the path is empty).
        Specified by:
        last in interface ItemPath
      • rest

        @NotNull
        @NotNull UniformItemPath rest​(int n)
        Description copied from interface: ItemPath
        Returns the rest of the path (the tail), starting at position "n".
        Specified by:
        rest in interface ItemPath
      • allUpToLastName

        @NotNull
        @NotNull UniformItemPath allUpToLastName()
        Returns a path containing all segments up to (and not including) the last one.
        Specified by:
        allUpToLastName in interface ItemPath
      • normalize

        UniformItemPath normalize()
        Makes the path "normal" by inserting null Id segments where they were omitted.
      • append

        @NotNull
        @NotNull UniformItemPath append​(Object... components)
        Description copied from interface: ItemPath
        Returns a newly created path containing all the segments of this path with added components.
        Specified by:
        append in interface ItemPath
      • remainder

        UniformItemPath remainder​(ItemPath prefix)
        Description copied from interface: ItemPath
        Returns the remainder of "this" path after passing all segments from the other path. (I.e. this path must begin with the content of the other path. Throws an exception when it is not the case.)
        Specified by:
        remainder in interface ItemPath
      • equals

        boolean equals​(Object obj)
        More strict version of ItemPath comparison. Does not use any normalization nor approximate matching QNames via QNameUtil.match. For semantic-level comparison, please use equivalent(..) method.
        Overrides:
        equals in class Object
      • asItemPathType

        Object asItemPathType()
      • setNamespaceMap

        void setNamespaceMap​(Map<String,​String> namespaceMap)
      • create

        static UniformItemPath create​(Object... segments)
        Description copied from interface: ItemPath
        Creates the path from given components. The components can contain objects of various kinds: - QName -> interpreted as either named segment or a special segment (if the name exactly matches special segment name) - Integer/Long -> interpreted as Id path segment - null -> interpreted as null Id path segment - ItemPathSegment -> interpreted as such - ItemPath, Object[], Collection -> interpreted recursively as a sequence of components Creates the default implementation of ItemPathImpl. Components are normalized on creation as necessary; although the number of object creation is minimized.