Class PathDescriptor
- java.lang.Object
-
- com.helger.photon.api.pathdescriptor.PathDescriptor
-
- All Implemented Interfaces:
Serializable
@Immutable public final class PathDescriptor extends Object implements Serializable
This class keeps a list ofPathDescriptorPartobjects 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsVariables()static PathDescriptorcreate(String sPath)booleanequals(Object o)com.helger.commons.collection.impl.ICommonsList<PathDescriptorPart>getAllParts()StringgetAsURLString()inthashCode()PathMatchingResultmatchesParts(List<String> aPathParts)Check if this path descriptor matches the provided path parts.StringtoString()
-
-
-
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-
nullPathMatchingResultobject with all matching variable names.
-
containsVariables
public boolean containsVariables()
-
create
@Nonnull public static PathDescriptor create(@Nonnull @Nonempty String sPath)
-
-