/** * * @return true if the URI start with mailto: */ private boolean isMailtoScheme() { if (termAtt.length() < 7 || termAtt.charAt(6) != ':') { return false; } if (termAtt.charAt(0) != 'm' || termAtt.charAt(1) != 'a' || termAtt.charAt(2) != 'i' || termAtt.charAt(3) != 'l' || termAtt.charAt(4) != 't' || termAtt.charAt(5) != 'o') return false; isMailto = true; return true; }
/** * * @return true if the URI start with mailto: */ private boolean isMailtoScheme() { if (termAtt.length() < 7 || termAtt.charAt(6) != ':') { return false; } if (termAtt.charAt(0) != 'm' || termAtt.charAt(1) != 'a' || termAtt.charAt(2) != 'i' || termAtt.charAt(3) != 'l' || termAtt.charAt(4) != 't' || termAtt.charAt(5) != 'o') return false; isMailto = true; return true; }
@Override protected boolean isTarget() { for (int i = 0; i < termAtt.length(); i++) { char c = termAtt.charAt(i); if (!Character.isDigit(c)) { return false; } } return true; }
@Override protected boolean accept() throws IOException { for (int i = 0; i < termAtt.length(); i++) { char c = termAtt.charAt(i); if (alphabetic && ('a' <= c && 'z' >= c)) { return true; } if (digit && Character.isDigit(c)) { return true; } if (letter && Character.isLetter(c)) { return true; } } return false; }
BytesRef computePayload() { char c = termAtt.charAt(0); assert c >= 48 && termAtt.length() == 1; return new BytesRef(new byte[] { (byte) (c - 48) }); }
final char c = termAtt.charAt(0); UnicodeBlock block = Character.UnicodeBlock.of(c); if (UnicodeBlock.HIRAGANA.equals(block)) {
if (termAtt.length() == 0 || UnicodeBlock.of(termAtt.charAt(0)) != UnicodeBlock.THAI) { return true;
if (termAtt.length() == 0 || UnicodeBlock.of(termAtt.charAt(0)) != UnicodeBlock.THAI) { return true;