org.apache.jackrabbit.spi.commons.name
Class MatchResult

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.name.MatchResult

public class MatchResult
extends Object

A MatchResult instance represents the result of matching a Pattern against a Path.


Method Summary
 Path getMatch()
          Returns the path which was matched by the Pattern.
 int getMatchLength()
          Returns the number of elements which where matched by the Pattern.
 int getMatchPos()
          Returns the position of the match
 Path getRemainder()
          Returns the remaining path after the matching part.
 boolean isFullMatch()
          Returns true if the Pattern matched the whole Path.
 boolean isMatch()
          Returns true if the Pattern matched anything or false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRemainder

public Path getRemainder()
Returns the remaining path after the matching part.

Returns:
The remaining path after the matching part such that the path constructed from getMatch() followed by getRemainder() is the original path or null if isFullMatch() is true.

getMatch

public Path getMatch()
Returns the path which was matched by the Pattern.

Returns:
The path which was matched such that the path constructed from getMatch() followed by getRemainder() is the original path or null if getMatchLength() is 0.

getMatchPos

public int getMatchPos()
Returns the position of the match

Returns:

getMatchLength

public int getMatchLength()
Returns the number of elements which where matched by the Pattern.

Returns:

isMatch

public boolean isMatch()
Returns true if the Pattern matched anything or false otherwise.

Returns:

isFullMatch

public boolean isFullMatch()
Returns true if the Pattern matched the whole Path.

Returns:


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.