Package org.nibor.autolink.internal
Class WwwScanner
- java.lang.Object
-
- org.nibor.autolink.internal.WwwScanner
-
-
Constructor Summary
Constructors Constructor Description WwwScanner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intfindFirst(java.lang.CharSequence input, int beginIndex, int rewindIndex)private static intfindLast(java.lang.CharSequence input, int beginIndex)private static booleanisAllowed(char c)private static booleanisWww(java.lang.CharSequence input, int triggerIndex)LinkSpanscan(java.lang.CharSequence input, int triggerIndex, int rewindIndex)
-
-
-
Method Detail
-
scan
public LinkSpan scan(java.lang.CharSequence input, int triggerIndex, int rewindIndex)
- Specified by:
scanin 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
nullif no link matched
-
findFirst
private static int findFirst(java.lang.CharSequence input, int beginIndex, int rewindIndex)
-
findLast
private static int findLast(java.lang.CharSequence input, int beginIndex)
-
isAllowed
private static boolean isAllowed(char c)
-
isWww
private static boolean isWww(java.lang.CharSequence input, int triggerIndex)
-
-