Class PathDescriptorVariableConstraint
- java.lang.Object
-
- com.helger.photon.api.pathdescriptor.PathDescriptorVariableConstraint
-
- All Implemented Interfaces:
Serializable
@Immutable public final class PathDescriptorVariableConstraint extends Object implements Serializable
This class keeps a single constraint that maybe used in aPathDescriptorPartobject.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PathDescriptorVariableConstraintcreateOrNull(String sConstraint)Factory method.booleanequals(Object o)StringgetAsURLString()EPathDescriptorVariableConstraintTypegetConstraintType()StringgetConstraintValue()inthashCode()booleanmatches(String sPathPart)StringtoString()
-
-
-
Method Detail
-
getConstraintType
@Nonnull public EPathDescriptorVariableConstraintType getConstraintType()
-
matches
public boolean matches(String sPathPart)
-
createOrNull
@Nullable public static PathDescriptorVariableConstraint createOrNull(@Nonnull String sConstraint)
Factory method. Tries to split the string of the formx[=y]where "x" is the constraint type and "y" is the constraint value. All possible constraint types are located inEPathDescriptorVariableConstraintType. If the constraint type requires no value the "y" part may be omitted.- Parameters:
sConstraint- Constraint to be parsed.- Returns:
nullif the passed constraint string could not be parsed.
-
-