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$
- Author:
- Martin Szugat
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTable(SymbolPropertyTable table)Adds a symbol property table to the database.Setnames()Returns the set of unique table names.intnumTables()Returns the number of symbol property tables in the database.SymbolPropertyTabletable(String name)Returns the table with the specified name.SymbolPropertyTableIteratortableIterator()Returns an iterator overSymbolPropertyTableobjects.
-
-
-
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- iftableisnull.
-
tableIterator
public SymbolPropertyTableIterator tableIterator()
Returns an iterator overSymbolPropertyTableobjects.- Specified by:
tableIteratorin interfaceSymbolPropertyTableDB- Returns:
- a new iterator
-
numTables
public int numTables()
Returns the number of symbol property tables in the database.- Specified by:
numTablesin interfaceSymbolPropertyTableDB- Returns:
- the number of tables
-
table
public SymbolPropertyTable table(String name) throws IllegalIDException, NullPointerException
Returns the table with the specified name.- Specified by:
tablein interfaceSymbolPropertyTableDB- 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- ifnameisnull.
-
names
public Set names()
Returns the set of unique table names.- Specified by:
namesin interfaceSymbolPropertyTableDB- Returns:
- a set containing strings
-
-