Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.module
Class ModuleList

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

public class ModuleList
extends Object

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

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

Constructor Summary
`ModuleList(List list)`

Method Summary
`boolean` | `add(Module m)` Adds a module to the list.
`void` | `clear()` Clear the list.
`boolean` | `contains(Module m)` Returns whether a module is contained in this list.
`Module` | `get(int i)` Returns the module at a given index.
`int` | `indexOf(Module m)` Returns the index of a module.
`boolean` | `isEmpty()` Returns whether the list is empty.
`Module` | `remove(int i)` Removes a module at a specific index.
`boolean` | `remove(Module m)` Removes a module from the list.
`int` | `size()` Returns the number of modules.
`Module[]` | `toArray()` Returns an array of modules.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ModuleList

    public ModuleList(List list)

Method Detail

### add

    public boolean add(Module m)

  Adds a module to the list.

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

### clear

    public void clear()

  Clear the list.

### contains

    public boolean contains(Module m)

  Returns whether a module is contained in this list.

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

### get

    public Module get(int i)

  Returns the module at a given index.

  Parameters:
    `i` - the index
  Returns:
    the module

### indexOf

    public int indexOf(Module m)

  Returns the index of a module.

  Parameters:
    `m` - the module
  Returns:
    the index

### isEmpty

    public boolean isEmpty()

  Returns whether the list is empty.

  Returns:
    T/F is the list empty

### remove

    public Module remove(int i)

  Removes a module at a specific index.

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

### remove

    public boolean remove(Module m)

  Removes a module from the list.

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

### size

    public int size()

  Returns the number of modules.

  Returns:
    the size of the list

### toArray

    public Module[] toArray()

  Returns an array of modules.

  Returns:
    the modules

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD