public final class AllAbsentMasterMoleculeStorage extends Object implements MasterMoleculeStorage
MasterMoleculeStorage implementation.| Constructor and Description |
|---|
AllAbsentMasterMoleculeStorage(int size)
Create.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Molecule> |
get(int index)
Get given structure identified with an index.
|
int |
getAbsentCount()
Number of absent structures.
|
Optional<String> |
getSource(int index)
Return given structure source as stored.
|
Class<Molecule> |
getStoredType()
Represented type.
|
boolean |
isPresent(int index)
Check if given entity is present.
|
int |
size()
Number of structures in the storage.
|
void |
writeIndirected(ObjectOutputStream oos,
SubProgressObserver po)
Write
Deserializer conform representation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitareAllAbsentpublic AllAbsentMasterMoleculeStorage(int size)
size - Virtual sizepublic Class<Molecule> getStoredType()
MasterStoragegetStoredType in interface MasterStorage<Molecule>public Optional<String> getSource(int index) throws IndexOutOfBoundsException
MasterMoleculeStoragegetSource in interface MasterMoleculeStorageindex - Structure indexIndexOutOfBoundsException - in case of errorpublic int size()
MasterStoragesize in interface MasterStorage<Molecule>public int getAbsentCount()
MasterStoragegetAbsentCount in interface MasterStorage<Molecule>public boolean isPresent(int index)
throws IndexOutOfBoundsException
MasterStorageisPresent in interface MasterStorage<Molecule>index - Structure indextrue when structure is presentIndexOutOfBoundsException - when index is less than 0 or greater or equal than MasterStorage.size()public Optional<Molecule> get(int index) throws IndexOutOfBoundsException
MasterStorageget in interface MasterStorage<Molecule>index - Structure indexIndexOutOfBoundsException - when index is less than 0 or greater or equal than MasterStorage.size()public void writeIndirected(ObjectOutputStream oos, SubProgressObserver po) throws IOException
IndirectSerializableDeserializer conform representation.
First a Deserializer instance is written to the stream using
ObjectOutputStream.writeObject(java.lang.Object). This instance is capable of deserializing the content
written next.writeIndirected in interface IndirectSerializable<MasterMoleculeStorage>oos - Stream to write topo - Observer to track progress; will be closed upon finishingIOException - delegated from underlying ObjectOutputStream accesses