Package org.nibor.autolink.internal
Class UrlScanner
- java.lang.Object
-
- org.nibor.autolink.internal.UrlScanner
-
-
Constructor Summary
Constructors Constructor Description UrlScanner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
findFirst(java.lang.CharSequence input, int beginIndex, int rewindIndex)
LinkSpan
scan(java.lang.CharSequence input, int triggerIndex, int rewindIndex)
private static boolean
schemeSpecial(char c)
-
-
-
Method Detail
-
scan
public LinkSpan scan(java.lang.CharSequence input, int triggerIndex, int rewindIndex)
- Specified by:
scan
in interfaceScanner
- Parameters:
input
- input texttriggerIndex
- the index at which the trigger character for this scanner wasrewindIndex
- the index that can maximally be rewound to (either the very first character of the input or the character after the last matched link) need to be set to be set here- Returns:
- the matched link, or
null
if no link matched
-
findFirst
private int findFirst(java.lang.CharSequence input, int beginIndex, int rewindIndex)
-
schemeSpecial
private static boolean schemeSpecial(char c)
-
-