|| textToMatch.length() > 0) && (pathIndex + 2) >= matchingContext.pathLength && matchingContext.isSeparator(pathIndex + 1);
matchingContext.isSeparator(pathIndex);
|| textToMatch.length() > 0) && (pathIndex + 2) >= matchingContext.pathLength && matchingContext.isSeparator(pathIndex + 1);
/** * Matching a separator is easy, basically the character at candidateIndex * must be the separator. */ @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { if (pathIndex < matchingContext.pathLength && matchingContext.isSeparator(pathIndex)) { if (isNoMorePattern()) { if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = pathIndex + 1; return true; } else { return (pathIndex + 1 == matchingContext.pathLength); } } else { pathIndex++; return (this.next != null && this.next.matches(pathIndex, matchingContext)); } } return false; }
/** * Matching a separator is easy, basically the character at candidateIndex * must be the separator. */ @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { if (pathIndex < matchingContext.pathLength && matchingContext.isSeparator(pathIndex)) { if (isNoMorePattern()) { if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = pathIndex + 1; return true; } else { return (pathIndex + 1 == matchingContext.pathLength); } } else { pathIndex++; return (this.next != null && this.next.matches(pathIndex, matchingContext)); } } return false; }
@Override public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext) { // If there is more data, it must start with the separator if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false; } if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = matchingContext.pathLength; } return true; }
@Override public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext) { // If there is more data, it must start with the separator if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false; } if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = matchingContext.pathLength; } return true; }
return (matchingContext.isMatchOptionalTrailingSeparator() && (pathIndex + 1) == matchingContext.pathLength && matchingContext.isSeparator(pathIndex));
matchingContext.isSeparator(pathIndex);
return (matchingContext.isMatchOptionalTrailingSeparator() && (pathIndex + 1) == matchingContext.pathLength && matchingContext.isSeparator(pathIndex));
segmentData != null && segmentData.length() > 0 && // and there is at least one character to match the *... (pathIndex + 1) == matchingContext.pathLength && // and the next path element is the end of the candidate... matchingContext.isSeparator(pathIndex)); // and the final element is a separator
if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false;
/** * Matching a separator is easy, basically the character at candidateIndex * must be the separator. */ @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { if (pathIndex < matchingContext.pathLength && matchingContext.isSeparator(pathIndex)) { if (isNoMorePattern()) { if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = pathIndex + 1; return true; } else { return (pathIndex + 1 == matchingContext.pathLength); } } else { pathIndex++; return (this.next != null && this.next.matches(pathIndex, matchingContext)); } } return false; }
return (matchingContext.isMatchOptionalTrailingSeparator() && (pathIndex + 1) == matchingContext.pathLength && matchingContext.isSeparator(pathIndex));
return (matchingContext.isMatchOptionalTrailingSeparator() && (pathIndex + 1) == matchingContext.pathLength && matchingContext.isSeparator(pathIndex));
segmentData != null && segmentData.length() > 0 && // and there is at least one character to match the *... (pathIndex + 1) == matchingContext.pathLength && // and the next path element is the end of the candidate... matchingContext.isSeparator(pathIndex)); // and the final element is a separator
@Override public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext) { // If there is more data, it must start with the separator if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false; } if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = matchingContext.pathLength; } return true; }
if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false;
/** * Matching a separator is easy, basically the character at candidateIndex * must be the separator. */ @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { if (pathIndex < matchingContext.pathLength && matchingContext.isSeparator(pathIndex)) { if (isNoMorePattern()) { if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = pathIndex + 1; return true; } else { return (pathIndex + 1 == matchingContext.pathLength); } } else { pathIndex++; return (this.next != null && this.next.matches(pathIndex, matchingContext)); } } return false; }
@Override public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext) { // If there is more data, it must start with the separator if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false; } if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = matchingContext.pathLength; } return true; }