|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.seq.db.SimpleSequenceDBInstallation
public class SimpleSequenceDBInstallation
This class is an implementation of interface SequenceDBInstallation that manages a set of SequenceDB objects. The set of SequenceDB objects is initially empty and can be expanded by the user through the addSequenceDB() method. This SequenceDBInstallation is then able to serve the SequenceDB objects in this set.
Constructor Summary | |
---|---|
SimpleSequenceDBInstallation()
create an initially empty SimpleSequenceDBInstallation |
Method Summary | |
---|---|
void |
addSequenceDB(SequenceDBLite sequenceDB,
Set otherIdentifiers)
addSequenceDB adds a new SequenceDB which will be
accessible via the name returned by its getName() method and
via all other given identifiers. |
void |
addSequenceDB(String name,
Set otherIdentifiers)
This method creates a new (and empty) HashSequenceDB with the given name that will be accessible through this sequence db installation through this name and all given other identifiers. |
boolean |
equals(Object o)
|
SequenceDBLite |
getSequenceDB(String identifier)
If the given identifier is known to this sequence db installation because it has been used in a call to addSequenceDB(), then this method returns the SequenceDB associated with this identifier. |
Set |
getSequenceDBs()
Return a newly created set of the SequenceDB objects that were already created through method addSequenceDB(). |
int |
hashCode()
|
static void |
main(String[] args)
Test this class |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleSequenceDBInstallation()
Method Detail |
---|
public void addSequenceDB(String name, Set otherIdentifiers)
name
- the name of the SequenceDB to create. Not null. If
this name is already used by this sequence db installation, an
IllegalArgumentException is thrown.otherIdentifiers
- a set of String objects that also serve
as identifiers for the newly created SequenceDB object. This set
should not contain the name of the SequenceDB, but if if does, it
is just ignored because the name is an identifier by
definition. The parameter may be empty or the empty set, in which
case the name is the only identifier for the newly created
SequenceDB. If any of the given identifiers (including the name)
is already used by this SimpleSequenceDBInstallation, an
IllegalArgumentException is thrown.public void addSequenceDB(SequenceDBLite sequenceDB, Set otherIdentifiers)
addSequenceDB
adds a new SequenceDB which will be
accessible via the name returned by its getName() method and
via all other given identifiers.
addSequenceDB
in interface SequenceDBInstallation
sequenceDB
- a SequenceDB
object to
add. Although a SequenceDB may normally have a null name this
is not acceptable when it is added to a
SimpleSequenceDBInstallation as the name is used as its primary
identifier. If the name is already used by this
SimpleSequenceDBInstallation, an IllegalArgumentException is
thrown.otherIdentifiers
- a Set
of String objects
that also serve as identifiers for the newly created
SequenceDB. This set should not contain the name of the
SequenceDB, but if if does, it is just ignored because the name
is an identifier by definition. The parameter may be empty or
the empty set, in which case the name is the only identifier
for the newly created SequenceDB. If any of the given
identifiers (including the name) is already used by this
sequence db installation, an IllegalArgumentException is
thrown.public Set getSequenceDBs()
getSequenceDBs
in interface SequenceDBInstallation
public SequenceDBLite getSequenceDB(String identifier)
getSequenceDB
in interface SequenceDBInstallation
identifier
- the string that identifies the sequence db. May
not be null.
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |