Package net.loomchild.segment.srx.legacy
Class ReaderMatcher
- java.lang.Object
-
- net.loomchild.segment.srx.legacy.ReaderMatcher
-
- All Implemented Interfaces:
MatchResult
public class ReaderMatcher extends Object implements MatchResult
RepresentsMatchResult
that usesReaderCharSequence
as a text - it takes care of exceptions that are thrown by it.- Author:
- loomchild
-
-
Constructor Summary
Constructors Constructor Description ReaderMatcher(Pattern pattern, CharSequence text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReaderMatcher
appendReplacement(StringBuffer sb, String replacement)
StringBuffer
appendTail(StringBuffer sb)
int
end()
int
end(int group)
boolean
find()
boolean
find(int start)
String
group()
String
group(int group)
int
groupCount()
boolean
hasAnchoringBounds()
boolean
hasTransparentBounds()
boolean
hitEnd()
boolean
lookingAt()
boolean
matches()
Pattern
pattern()
ReaderMatcher
region(int start, int end)
int
regionEnd()
int
regionStart()
String
replaceAll(String replacement)
String
replaceFirst(String replacement)
boolean
requireEnd()
ReaderMatcher
reset()
ReaderMatcher
reset(CharSequence input)
int
start()
int
start(int group)
MatchResult
toMatchResult()
String
toString()
ReaderMatcher
useAnchoringBounds(boolean b)
ReaderMatcher
usePattern(Pattern newPattern)
ReaderMatcher
useTransparentBounds(boolean b)
-
-
-
Constructor Detail
-
ReaderMatcher
public ReaderMatcher(Pattern pattern, CharSequence text)
-
-
Method Detail
-
appendReplacement
public ReaderMatcher appendReplacement(StringBuffer sb, String replacement)
-
appendTail
public StringBuffer appendTail(StringBuffer sb)
-
end
public int end()
- Specified by:
end
in interfaceMatchResult
-
end
public int end(int group)
- Specified by:
end
in interfaceMatchResult
-
find
public boolean find()
-
find
public boolean find(int start)
-
group
public String group()
- Specified by:
group
in interfaceMatchResult
-
group
public String group(int group)
- Specified by:
group
in interfaceMatchResult
-
groupCount
public int groupCount()
- Specified by:
groupCount
in interfaceMatchResult
-
hasAnchoringBounds
public boolean hasAnchoringBounds()
-
hasTransparentBounds
public boolean hasTransparentBounds()
-
hitEnd
public boolean hitEnd()
-
lookingAt
public boolean lookingAt()
-
matches
public boolean matches()
-
pattern
public Pattern pattern()
-
region
public ReaderMatcher region(int start, int end)
-
regionEnd
public int regionEnd()
-
regionStart
public int regionStart()
-
requireEnd
public boolean requireEnd()
-
reset
public ReaderMatcher reset()
-
reset
public ReaderMatcher reset(CharSequence input)
-
start
public int start()
- Specified by:
start
in interfaceMatchResult
-
start
public int start(int group)
- Specified by:
start
in interfaceMatchResult
-
toMatchResult
public MatchResult toMatchResult()
-
useAnchoringBounds
public ReaderMatcher useAnchoringBounds(boolean b)
-
usePattern
public ReaderMatcher usePattern(Pattern newPattern)
-
useTransparentBounds
public ReaderMatcher useTransparentBounds(boolean b)
-
-