abstract class PathElement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
CAPTURE_VARIABLE_WEIGHT |
protected PathElement |
next
The next path element in the chain
|
protected int |
pos
Position in the pattern where this path element starts
|
protected PathElement |
prev
The previous path element in the chain
|
protected static int |
WILDCARD_WEIGHT |
Constructor and Description |
---|
PathElement(int pos)
Create a new path element.
|
Modifier and Type | Method and Description |
---|---|
int |
getCaptureCount() |
abstract int |
getNormalizedLength() |
int |
getScore() |
int |
getWildcardCount() |
abstract boolean |
matches(int candidatePos,
PathPattern.MatchingContext matchingContext)
Attempt to match this path element.
|
protected static final int WILDCARD_WEIGHT
protected static final int CAPTURE_VARIABLE_WEIGHT
protected int pos
protected PathElement next
protected PathElement prev
PathElement(int pos)
pos
- the position where this path element starts in the pattern datapublic abstract boolean matches(int candidatePos, PathPattern.MatchingContext matchingContext)
candidatePos
- the current position within the candidate pathmatchingContext
- encapsulates context for the match including the candidatepublic abstract int getNormalizedLength()
public int getCaptureCount()
public int getWildcardCount()
public int getScore()