some prefomance turting

git-svn-id: https://russianmorphology.googlecode.com/svn/trunk@122 d817d54c-26ab-11de-abc9-2f7d1455ff7a
This commit is contained in:
Alexander.A.Kuznetsov
2010-10-18 12:24:50 +00:00
parent 43136e0de1
commit d46651f2ba
11 changed files with 19 additions and 206 deletions

View File

@ -21,6 +21,7 @@ import org.apache.lucene.morphology.SuffixToLongException;
import org.apache.lucene.morphology.WrongCharaterException;
import java.util.ArrayList;
import java.util.LinkedList;
/**
* This helper class allow encode suffix of russian word
@ -57,7 +58,7 @@ public class RussianLetterDecoderEncoder implements LetterDecoderEncoder {
}
public int[] encodeToArray(String s) {
ArrayList<Integer> integers = new ArrayList<Integer>();
LinkedList<Integer> integers = new LinkedList<Integer>();
while (s.length() > WORD_PART_LENGHT) {
integers.add(encode(s.substring(0, WORD_PART_LENGHT)));
s = s.substring(WORD_PART_LENGHT);