java.lang.Object
org.xbib.net.path.spring.element.PathElement
org.xbib.net.path.spring.element.WildcardPathElement
A wildcard path element. In the pattern '/foo/*/goo' the * is
represented by a WildcardPathElement. Within a path it matches at least
one character but at the end of a path it can match zero characters.
-
Feldübersicht
Von Klasse geerbte Felder org.xbib.net.path.spring.element.PathElement
CAPTURE_VARIABLE_WEIGHT, next, NO_PARAMETERS, pos, prev, separator, WILDCARD_WEIGHT -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungchar[]getChars()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 (*, ?)booleanmatches(int pathIndex, MatchingContext matchingContext) Matching on a WildcardPathElement is quite straight forward.toString()Von Klasse geerbte Methoden org.xbib.net.path.spring.element.PathElement
getCaptureCount, isNoMorePattern
-
Konstruktordetails
-
WildcardPathElement
public WildcardPathElement(int pos, char separator)
-
-
Methodendetails
-
matches
Matching on a WildcardPathElement is quite straight forward. Scan the candidate from the candidateIndex onwards for the next separator or the end of the candidate.- Angegeben von:
matchesin KlassePathElement- Parameter:
pathIndex- the current position within the candidate pathmatchingContext- encapsulates context for the match including the candidate- Gibt zurück:
trueif it matches, otherwisefalse
-
getNormalizedLength
public int getNormalizedLength()Beschreibung aus Klasse kopiert:PathElementReturn the length of the path element where captures are considered to be one character long.- Angegeben von:
getNormalizedLengthin KlassePathElement- Gibt zurück:
- the normalized length
-
getChars
public char[] getChars()- Angegeben von:
getCharsin KlassePathElement
-
getWildcardCount
public int getWildcardCount()Beschreibung aus Klasse kopiert:PathElementReturn the number of wildcard elements (*, ?) in the path element.- Setzt außer Kraft:
getWildcardCountin KlassePathElement
-
getScore
public int getScore()Beschreibung aus Klasse kopiert:PathElementReturn the score for this PathElement, combined score is used to compare parsed patterns.- Setzt außer Kraft:
getScorein KlassePathElement
-
toString
-