Ejemplo 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;
 }
Ejemplo 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);
 }