uk.ac.man.bioinf.module
Class ModuleIdentifierList

java.lang.Object
  |
  +--uk.ac.man.bioinf.module.ModuleIdentifierList

public class ModuleIdentifierList
extends Object

To provide a list of module identifiers in a type safe manor. This is basically a thin wrapper to list, specially targeted for module identifiers. Created: Wed May 24 15:06:49 2000

Version:
$Id: ModuleIdentifierList.java,v 1.3 2001/04/11 17:04:43 lord Exp $
Author:
J Selley

Constructor Summary
ModuleIdentifierList(List list)
           
 
Method Summary
 boolean add(ModuleIdentifier m)
          Adds a module identifier to the list.
 void clear()
          Clear the list.
 boolean contains(ModuleIdentifier m)
          Returns whether a module identifier is contained in this list.
 ModuleIdentifier get(int i)
          Returns the module identifier at a given index.
 int indexOf(ModuleIdentifier m)
          Returns the index of a module identifier.
 boolean isEmpty()
          Returns whether the list is empty.
 ModuleIdentifier remove(int i)
          Removes a module identifier at a specific index.
 boolean remove(ModuleIdentifier m)
          Removes a module identifier from the list.
 int size()
          Returns the number of module identifiers.
 ModuleIdentifier[] toArray()
          Returns an array of module identifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleIdentifierList

public ModuleIdentifierList(List list)
Method Detail

add

public boolean add(ModuleIdentifier m)
Adds a module identifier to the list.

Parameters:
m - the module identifier
Returns:
the success of the addition

clear

public void clear()
Clear the list.


contains

public boolean contains(ModuleIdentifier m)
Returns whether a module identifier is contained in this list.

Parameters:
m - the query module identifier
Returns:
T/F exists

get

public ModuleIdentifier get(int i)
Returns the module identifier at a given index.

Parameters:
i - the index
Returns:
the module identifier

indexOf

public int indexOf(ModuleIdentifier m)
Returns the index of a module identifier.

Parameters:
m - the module identifier
Returns:
the index

isEmpty

public boolean isEmpty()
Returns whether the list is empty.

Returns:
T/F is the list empty

remove

public ModuleIdentifier remove(int i)
Removes a module identifier at a specific index.

Parameters:
i - the index of the module identifier
Returns:
the module identifier removed

remove

public boolean remove(ModuleIdentifier m)
Removes a module identifier from the list.

Parameters:
m - the module identifier to be removed
Returns:
the success

size

public int size()
Returns the number of module identifiers.

Returns:
the size of the list

toArray

public ModuleIdentifier[] toArray()
Returns an array of module identifiers.

Returns:
the module identifiers