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, wait
areAllAbsent
public AllAbsentMasterMoleculeStorage(int size)
size
- Virtual sizepublic Class<Molecule> getStoredType()
MasterStorage
getStoredType
in interface MasterStorage<Molecule>
public Optional<String> getSource(int index) throws IndexOutOfBoundsException
MasterMoleculeStorage
getSource
in interface MasterMoleculeStorage
index
- Structure indexIndexOutOfBoundsException
- in case of errorpublic int size()
MasterStorage
size
in interface MasterStorage<Molecule>
public int getAbsentCount()
MasterStorage
getAbsentCount
in interface MasterStorage<Molecule>
public boolean isPresent(int index) throws IndexOutOfBoundsException
MasterStorage
isPresent
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
MasterStorage
get
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
IndirectSerializable
Deserializer
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