- java.lang.Object
-
- org.nibor.autolink.internal.EmailScanner
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
domainMustHaveDot
-
Constructor Summary
Constructors Constructor Description EmailScanner(boolean domainMustHaveDot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
findFirst(java.lang.CharSequence input, int beginIndex, int rewindIndex)
private int
findLast(java.lang.CharSequence input, int beginIndex)
private boolean
localAtomAllowed(char c)
LinkSpan
scan(java.lang.CharSequence input, int triggerIndex, int rewindIndex)
private boolean
subDomainAllowed(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)
-
findLast
private int findLast(java.lang.CharSequence input, int beginIndex)
-
localAtomAllowed
private boolean localAtomAllowed(char c)
-
subDomainAllowed
private boolean subDomainAllowed(char c)
-
-