Renamed LinkedList to SimplifiedLinkList and moved it from org.thdl.tib.scanner to org.thdl.util. This linked list was implemented because the VM running on handhelds does not include java.util.LinkedList.
This commit is contained in:
parent
d836b850e8
commit
a7a573020f
12 changed files with 65 additions and 50 deletions
|
@ -17,6 +17,7 @@ Contributor(s): ______________________________________.
|
|||
*/
|
||||
package org.thdl.tib.scanner;
|
||||
|
||||
import org.thdl.util.*;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
|
||||
|
@ -30,14 +31,14 @@ import java.io.*;
|
|||
public class RemoteTibetanScanner implements TibetanScanner
|
||||
{
|
||||
private String url;
|
||||
private LinkedList wordList;
|
||||
private SimplifiedLinkedList wordList;
|
||||
private DictionarySource defSourcesWanted;
|
||||
|
||||
public RemoteTibetanScanner(String url) throws Exception
|
||||
{
|
||||
defSourcesWanted = DictionarySource.getAllDictionaries();
|
||||
this.url = url;
|
||||
wordList = new LinkedList();
|
||||
wordList = new SimplifiedLinkedList();
|
||||
}
|
||||
|
||||
/** dont use */
|
||||
|
@ -89,21 +90,21 @@ public class RemoteTibetanScanner implements TibetanScanner
|
|||
}
|
||||
}
|
||||
|
||||
public LinkedList getTokenLinkedList()
|
||||
public SimplifiedLinkedList getTokenLinkedList()
|
||||
{
|
||||
return wordList;
|
||||
}
|
||||
|
||||
public void clearTokens()
|
||||
{
|
||||
wordList = new LinkedList();
|
||||
wordList = new SimplifiedLinkedList();
|
||||
}
|
||||
|
||||
public Token[] getTokenArray()
|
||||
{
|
||||
int i=0;
|
||||
Token token[] = new Token[wordList.size()];
|
||||
ListIterator li = wordList.listIterator();
|
||||
SimplifiedListIterator li = wordList.listIterator();
|
||||
while(li.hasNext())
|
||||
token[i++] = (Token)li.next();
|
||||
return token;
|
||||
|
@ -131,7 +132,7 @@ public class RemoteTibetanScanner implements TibetanScanner
|
|||
uC.setRequestProperty("Content-type", "text/plain");
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(uC.getInputStream()));
|
||||
LinkedList ll1 = new LinkedList(), ll2 = new LinkedList();
|
||||
SimplifiedLinkedList ll1 = new SimplifiedLinkedList(), ll2 = new SimplifiedLinkedList();
|
||||
String s;
|
||||
while ((s=br.readLine())!=null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue