vqServer API Class vq.utils.kllist

java.lang.Object
    |
    +----vq.utils.kllist
Contents
Package index
Package
API index

public class kllist
extends java.lang.Object
Linked list. All entries in an instance of kllist must be instances of (descendants of) klentry. The base class for most of vqServer's internal lists.

See Also:
klentry

Constructor Index

 o kllist()
Creates an empty list.
 o kllist(vqis)
Creates a new list and fills it with entries read from the specified input stream.

Method Index

 o add(klentry)
Adds the specified entry to the end of the list.
 o add(klentry, klentry)
Adds an entry to the list after the specified entry.
 o addData(String)
Creates a new instance of klentry with the specified key and adds it to the end of the list.
 o addData(String, klentry)
Creates a new entry (a klentry) with the specified key and adds it to the list after the specified entry.
 o count()
Returns the number of entries in the list.
 o enumKeys()
Returns an enumeration of the keys of the entries in the list.
 o first()
Returns the first entry in the list or null if the list is empty.
 o get(int)
Returns the nth entry in the list or null if the number of entries in the list is less than n.
 o get(String)
Returns the first entry in the list whose key matches (case insensitive) the specified string or null if no corresponding entry is found.
 o kill()
Calls the kill() method of each entry in the list and removes all entries from the list.
 o last()
Returns the last entry in the list or null if the list is empty.
 o moveDown(klentry)
Moves the specified entry downwards by one position.
 o moveTo(klentry, klentry)
Moves an entry to another position in the list.
 o moveUp(klentry)
Moves the specified entry upwards by one position.
 o read(vqis)
Reads entries from the specified input stream and appends them to the list.
 o remove(klentry)
Removes the specified entry from the list.
 o save(String)
Writes the list to the specified file in vqServer .cfg file format.
 o save(vqos)
Writes the list to the output stream specified in vqServer .cfg file format.

Constructor Detail

 o kllist
public kllist()
          Creates an empty list.
 o kllist
public kllist(vqis is)
          Creates a new list and fills it with entries read from the specified input stream. Can only read instances of klentry, not classes that are descendants of klentry. The entries must be stored in vqServer .cfg file format.
Parameters:
is - the input stream to read the entries from

Method Detail

 o read
public void read(vqis is) throws java.io.IOException
          Reads entries from the specified input stream and appends them to the list. Can only read instances of klentry, not classes that are descendants of klentry. The entries must be stored in vqServer .cfg file format.
Parameters:
is - the input stream to read the entries from
 o kill
public void kill()
          Calls the kill() method of each entry in the list and removes all entries from the list.
 o add
public void add(klentry newEntry,
                klentry prevEntry)
          Adds an entry to the list after the specified entry. Warning: does not check the list membership of either parameter.
Parameters:
newEntry - the entry to add to the list
prevEntry - the entry which will precede the new entry in the list
 o addData
public void addData(java.lang.String newKey,
                    klentry prevEntry)
          Creates a new entry (a klentry) with the specified key and adds it to the list after the specified entry. Warning: does not check the list membership of prevEntry.
Parameters:
newKey - the key of the new entry
prevEntry - the entry which will precede the new entry in the list
 o addData
public void addData(java.lang.String newKey)
          Creates a new instance of klentry with the specified key and adds it to the end of the list.
Parameters:
newKey - the key of the new entry
 o add
public void add(klentry newEntry)
          Adds the specified entry to the end of the list. Warning: does not check the list membership of the parameter.
Parameters:
newEntry - the entry to add to the list
 o remove
public void remove(klentry theEntry)
          Removes the specified entry from the list. Warning: does not check the list membership of the parameter.
Parameters:
theEntry - the entry to remove from the list
 o moveUp
public void moveUp(klentry theEntry)
          Moves the specified entry upwards by one position. Warning: does not check the list membership of the parameter.
Parameters:
theEntry - the entry to move
 o moveDown
public void moveDown(klentry theEntry)
          Moves the specified entry downwards by one position. Warning: does not check the list membership of the parameter.
Parameters:
theEntry - the entry to move
 o moveTo
public void moveTo(klentry theEntry,
                   klentry prevEntry)
          Moves an entry to another position in the list. Warning: does not check the list membership of either parameter.
Parameters:
theEntry - the entry to move
prevEntry - the entry which will precede theEntry after the move
 o count
public int count()
          Returns the number of entries in the list.
Returns:
the number of entries in the list
 o first
public klentry first()
          Returns the first entry in the list or null if the list is empty.
Returns:
the first entry in the list
 o last
public klentry last()
          Returns the last entry in the list or null if the list is empty.
Returns:
the last entry in the list
 o get
public klentry get(java.lang.String theKey)
          Returns the first entry in the list whose key matches (case insensitive) the specified string or null if no corresponding entry is found.
Parameters:
theKey - the key of the entry to retrieve
Returns:
the first entry in the list whose key matches the parameter
 o get
public klentry get(int n)
          Returns the nth entry in the list or null if the number of entries in the list is less than n.
Parameters:
n - the index of the entry in the list to retrieve
Returns:
the nth entry in the list
 o enumKeys
public java.util.Enumeration enumKeys()
          Returns an enumeration of the keys of the entries in the list.
Returns:
an enumeration of the keys of the entries in the list
See Also:
java.util.Enumeration
 o save
public void save(java.lang.String fname)
          Writes the list to the specified file in vqServer .cfg file format. Calls the save(vqos) method of each entry in the list. Warning: the contents of the file are overwritten.
Parameters:
fname - the name of the file to write the list to
 o save
public void save(vqos os) throws java.io.IOException
          Writes the list to the output stream specified in vqServer .cfg file format. Calls the save(vqos) method of each entry in the list.
Parameters:
os - the output stream to write the list to


vqServer API version 1.9. vqServer and the vqServer API are copyright © Steve Shering and vqSoft 1997-2000. Last updated 15 May 2000.

Contents
Package index
Package
API index