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 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 overSymbolPropertyTable
objects.
-
-
-
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
- iftable
isnull
.
-
tableIterator
public SymbolPropertyTableIterator tableIterator()
Returns an iterator overSymbolPropertyTable
objects.- Specified by:
tableIterator
in interfaceSymbolPropertyTableDB
- Returns:
- a new iterator
-
numTables
public int numTables()
Returns the number of symbol property tables in the database.- Specified by:
numTables
in interfaceSymbolPropertyTableDB
- 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 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
- ifname
isnull
.
-
names
public Set names()
Returns the set of unique table names.- Specified by:
names
in interfaceSymbolPropertyTableDB
- Returns:
- a set containing strings
-
-