java.lang.Object
org.xbib.net.path.spring.element.PathElement
org.xbib.net.path.spring.element.CaptureVariablePathElement
A path element representing capturing a piece of the path as a variable. In the pattern
'/foo/{bar}/goo' the {bar} is represented as a
CaptureVariablePathElement. There
must be at least one character to bind to the variable.-
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
KonstruktorenKonstruktorBeschreibungCaptureVariablePathElement(int pos, char[] captureDescriptor, boolean caseSensitive, char separator) Create a newCaptureVariablePathElementinstance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintReturn the number of variables captured by the path element.char[]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) Attempt to match this path element.toString()Von Klasse geerbte Methoden org.xbib.net.path.spring.element.PathElement
isNoMorePattern
-
Konstruktordetails
-
CaptureVariablePathElement
public CaptureVariablePathElement(int pos, char[] captureDescriptor, boolean caseSensitive, char separator) Create a newCaptureVariablePathElementinstance.- Parameter:
pos- the position in the pattern of this capture elementcaptureDescriptor- is of the form {AAAAA[:pattern]}
-
-
Methodendetails
-
matches
Beschreibung aus Klasse kopiert:PathElementAttempt to match this path element.- 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
-
getVariableName
-
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
-
getCaptureCount
public int getCaptureCount()Beschreibung aus Klasse kopiert:PathElementReturn the number of variables captured by the path element.- Setzt außer Kraft:
getCaptureCountin 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
-