Class TokenReplacedStream.Pattern
- java.lang.Object
-
- org.apache.openjpa.persistence.jest.TokenReplacedStream.Pattern
-
- Enclosing class:
- TokenReplacedStream
public static class TokenReplacedStream.Pattern extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisMatched()Is this pattern matched fully?intmatch(char c)Match the given character with the current cursor and advance the matching length.Stringreplace()Gets the string to be replaced.voidreset()Reset the cursor.StringtoString()
-
-
-
Method Detail
-
match
public int match(char c)
Match the given character with the current cursor and advance the matching length.- Parameters:
c-- Returns:
- the matching length. -1 denotes the pattern did not match the character.
-
reset
public void reset()
Reset the cursor. Subsequent matching will begin at start.
-
isMatched
public boolean isMatched()
Is this pattern matched fully? A pattern is fully matched when the matching length is equal to the length of the pattern string.
-
replace
public String replace()
Gets the string to be replaced.
-
-