Esempio n. 1
0
 @Override
 public final boolean incrementToken() throws IOException {
   if (input.incrementToken()) {
     final char[] buffer = termAtt.buffer();
     final int length = termAtt.length();
     for (int i = 0; i < length; ) {
       i += Character.toChars(Character.toLowerCase(charUtils.codePointAt(buffer, i)), buffer, i);
     }
     return true;
   } else return false;
 }
Esempio n. 2
0
 /**
  * Create a new LowerCaseFilter, that normalizes token text to lower case.
  *
  * @param matchVersion See <a href="#version">above</a>
  * @param in TokenStream to filter
  */
 public LowerCaseFilter(Version matchVersion, TokenStream in) {
   super(in);
   charUtils = CharacterUtils.getInstance(matchVersion);
 }