|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.util.data.storage.AbstractDuDeStorage<T> de.hpi.fgis.dude.util.data.storage.InMemoryStorage<T>
T
- The Jsonable
type whose instances are stored.public class InMemoryStorage<T extends Jsonable>
InMemoryStorage
stores Jsonable
instances in memory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.hpi.fgis.dude.util.data.storage.AbstractDuDeStorage |
---|
AbstractDuDeStorage.AbstractJsonableWriter<T extends Jsonable> |
Constructor Summary | |
---|---|
InMemoryStorage()
Initializes a InMemoryStorage instance. |
|
InMemoryStorage(Collection<T> initialContent)
Initializes a InMemoryStorage instance with the passed initial content. |
Method Summary | |
---|---|
JsonableReader<T> |
getReader()
Returns the JsonableReader that can be used to access the content of this DuDeStorage . |
JsonableWriter<T> |
getWriter()
Returns the JsonableWriter that can be used to add instances to this DuDeStorage . |
int |
size()
Returns the number of instances that are contained. |
Methods inherited from class de.hpi.fgis.dude.util.data.storage.AbstractDuDeStorage |
---|
disableFormattedJson, enableFormattedJson, isFormattedJson |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemoryStorage() throws IOException
InMemoryStorage
instance.
IOException
- If an I/O error occurs while accessing the initial content.public InMemoryStorage(Collection<T> initialContent) throws IOException
InMemoryStorage
instance with the passed initial content.
initialContent
- The content that shall be added to the storage initially.
IOException
- If an I/O error occurs while accessing the initial content.Method Detail |
---|
public JsonableReader<T> getReader()
JsonReadable
JsonableReader
that can be used to access the content of this DuDeStorage
.
JsonableReader
for iterating over the content.public JsonableWriter<T> getWriter()
JsonWritable
JsonableWriter
that can be used to add instances to this DuDeStorage
.
JsonableWriter
for adding content to this storage.public int size()
JsonReadable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |