## org.biojava.bio.proteomics.aaindex
Class SimpleSymbolPropertyTableDB

    java.lang.Object
      org.biojava.bio.proteomics.aaindex.SimpleSymbolPropertyTableDB

All Implemented Interfaces:
  SymbolPropertyTableDB

    public class SimpleSymbolPropertyTableDB

extends Object
implements SymbolPropertyTableDB

A simple implementation of a symbol property table database.

Version:
  $Revision: 3601 $
Author:
  Martin Szugat

Constructor Summary
`SimpleSymbolPropertyTableDB()` Initializes the database.
`SimpleSymbolPropertyTableDB(SymbolPropertyTableIterator tableIterator)` Initializes the database by copying all symbol property tables from a given iterator into the database.

Method Summary
`void` `addTable(SymbolPropertyTable table)` Adds a symbol property table to the database.
`Set` `names()` Returns the set of unique table names.
`int` `numTables()` Returns the number of symbol property tables in the database.
`SymbolPropertyTable` `table(String name)` Returns the table with the specified name.
`SymbolPropertyTableIterator` `tableIterator()` Returns an iterator over `SymbolPropertyTable` objects.

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

Constructor Detail

### SimpleSymbolPropertyTableDB

    public SimpleSymbolPropertyTableDB()

  Initializes the database.

### SimpleSymbolPropertyTableDB

    public SimpleSymbolPropertyTableDB(SymbolPropertyTableIterator tableIterator)
                                throws BioException

  Initializes the database by copying all symbol property tables from a given iterator into the database.

  Parameters:
    `tableIterator` - an iterator over symbol property tables.
  Throws:
    `BioException` - if the symbol property tables could not be iterated.

Method Detail

### addTable

    public void addTable(SymbolPropertyTable table)
                  throws NullPointerException

  Adds a symbol property table to the database. Overrides an existing table entry with the same name.

  Parameters:
    `table` - the symbol property table to add.
  Throws:
    `NullPointerException` - if `table` is `null`.

### tableIterator

    public SymbolPropertyTableIterator tableIterator()

  Returns an iterator over `SymbolPropertyTable` objects.

  Specified by:
    `tableIterator` in interface `SymbolPropertyTableDB`
  Returns:
    a new iterator

### numTables

    public int numTables()

  Returns the number of symbol property tables in the database.

  Specified by:
    `numTables` in interface `SymbolPropertyTableDB`
  Returns:
    the number of tables

### table

    public SymbolPropertyTable table(String name)
                              throws IllegalIDException,
                                     NullPointerException

  Returns the table with the specified name.

  Specified by:
    `table` in interface `SymbolPropertyTableDB`
  Parameters:
    `name` - the name of the table
  Returns:
    the specified table
  Throws:
    `IllegalIDException` - if no symbol property table with the specified name could be found.
    `NullPointerException` - if `name` is `null`.

### names

    public Set names()

  Returns the set of unique table names.

  Specified by:
    `names` in interface `SymbolPropertyTableDB`
  Returns:
    a set containing strings