Got rid of redundant code

This commit is contained in:
amontano 2003-08-03 06:28:22 +00:00
parent cce779bf88
commit 2b5a5fe67a
8 changed files with 129 additions and 91 deletions

View file

@ -76,36 +76,12 @@ public class DictionaryTableModel extends AbstractTableModel
return getValueAt(0, c).getClass();
}
public void newSearch(Token[] token)
public void newSearch(Word[] array)
{
int i, n=0;
if (token==null)
array = null;
else
{
for (i=0; i<token.length; i++)
{
if (token[i] instanceof Word)
n++;
}
if (n==0)
{
array=null;
}
else
{
array = new Word[n];
n=0;
for (i=0; i<token.length; i++)
{
if (token[i] instanceof Word)
{
array[n] = (Word) token[i];
n++;
}
}
}
}
this.array = array;
if (array==null)
arrayTibetan = null;
else