Class PathDescriptor

  • All Implemented Interfaces:
    Serializable

    @Immutable
    public final class PathDescriptor
    extends Object
    implements Serializable
    This class keeps a list of PathDescriptorPart objects that are created when initially parsing an API path. It consists of plain string parts as well as of dynamic (variable) parts.
    Author:
    Philip Helger
    See Also:
    Serialized Form
    • Method Detail

      • getAllParts

        @Nonnull
        @ReturnsMutableCopy
        public com.helger.commons.collection.impl.ICommonsList<PathDescriptorPart> getAllParts()
      • matchesParts

        @Nonnull
        public PathMatchingResult matchesParts​(@Nonnull
                                               List<String> aPathParts)
        Check if this path descriptor matches the provided path parts. This requires that this path descriptor and the provided collection have the same number of elements and that all static and variable parts match.
        Parameters:
        aPathParts - The parts to
        Returns:
        A non-null PathMatchingResult object with all matching variable names.
      • containsVariables

        public boolean containsVariables()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object