java.lang.Object
org.xbib.net.path.spring.element.PathElement
- Bekannte direkte Unterklassen:
CaptureTheRestPathElement,CaptureVariablePathElement,LiteralPathElement,RegexPathElement,SeparatorPathElement,SingleCharWildcardedPathElement,WildcardPathElement,WildcardTheRestPathElement
Common supertype for the Ast nodes created to represent a path pattern.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected static final intprotected static final MultiValueMap<String, String> protected final intprotected final charprotected static final int -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintReturn the number of variables captured by the path element.abstract char[]getChars()abstract intReturn the length of the path element where captures are considered to be one character long.intgetScore()Return the score for this PathElement, combined score is used to compare parsed patterns.intReturn the number of wildcard elements (*, ?)protected final booleanReturn if the there are no more PathElements in the pattern.abstract booleanmatches(int candidatePos, MatchingContext matchingContext) Attempt to match this path element.
-
Felddetails
-
WILDCARD_WEIGHT
protected static final int WILDCARD_WEIGHT- Siehe auch:
-
CAPTURE_VARIABLE_WEIGHT
protected static final int CAPTURE_VARIABLE_WEIGHT- Siehe auch:
-
NO_PARAMETERS
-
pos
protected final int pos -
separator
protected final char separator -
next
-
prev
-
-
Konstruktordetails
-
PathElement
public PathElement(int pos, char separator) Create a new path element.- Parameter:
pos- the position where this path element starts in the pattern dataseparator- the separator in use in the path pattern
-
-
Methodendetails
-
matches
Attempt to match this path element.- Parameter:
candidatePos- the current position within the candidate pathmatchingContext- encapsulates context for the match including the candidate- Gibt zurück:
trueif it matches, otherwisefalse
-
getNormalizedLength
public abstract int getNormalizedLength()Return the length of the path element where captures are considered to be one character long.- Gibt zurück:
- the normalized length
-
getChars
public abstract char[] getChars() -
getCaptureCount
public int getCaptureCount()Return the number of variables captured by the path element. -
getWildcardCount
public int getWildcardCount()Return the number of wildcard elements (*, ?) in the path element. -
getScore
public int getScore()Return the score for this PathElement, combined score is used to compare parsed patterns. -
isNoMorePattern
protected final boolean isNoMorePattern()Return if the there are no more PathElements in the pattern.- Gibt zurück:
trueif the there are no more elements
-