DataSet, ModBasedDataSetpublic abstract class AbstractDataSet
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.String,DataPart> |
data |
|
protected java.util.Map<java.lang.String,DataPart> |
dataUnmodifiable |
| Constructor | Description |
|---|---|
AbstractDataSet() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPart(DataPart part) |
|
void |
clear() |
|
boolean |
equals(java.lang.Object o) |
|
java.util.Map<java.lang.String,DataPart> |
getData() |
|
<T> T |
getPartContent(java.lang.String key,
java.lang.Class<? extends DataPart<T>> typeClass,
T defaultValue) |
|
int |
hashCode() |
|
boolean |
hasKey(java.lang.String key) |
|
boolean |
isEmpty() |
|
void |
read(com.google.gson.JsonObject main) |
Reads a data set directly from a json object head, throwing an exception
if something fails.
|
void |
read(java.io.DataInput stream) |
Reads a data set directly from a data input of any kind, throwing an
exception if something fails.
|
void |
read(java.io.File file,
boolean asJson) |
Reads a data set from the given file either as binary or as a json and
stores the data in the set.
|
DataPart |
remove(java.lang.String key) |
|
int |
size() |
|
java.lang.String |
toString() |
|
void |
write(com.google.gson.JsonObject main) |
Writes a data set directly to a json object head, throwing an exception
if something fails.
|
void |
write(java.io.DataOutput stream) |
Writes a data set directly to a data output of any kind, throwing an
exception if something fails.
|
void |
write(java.io.File file,
boolean asJson) |
Writes a data set to the given file either as binary or as a json
|
protected final java.util.Map<java.lang.String,DataPart> data
protected final java.util.Map<java.lang.String,DataPart> dataUnmodifiable
public void addPart(DataPart part)
public boolean hasKey(java.lang.String key)
public DataPart remove(java.lang.String key)
public void clear()
public int size()
public <T> T getPartContent(java.lang.String key,
java.lang.Class<? extends DataPart<T>> typeClass,
T defaultValue)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<java.lang.String,DataPart> getData()
public boolean isEmpty()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void write(java.io.File file,
boolean asJson)
file - The file to write toasJson - Wether it should be stored as jsonpublic void read(java.io.File file,
boolean asJson)
file - The file to read fromasJson - Wether or not it should be stored as jsonpublic void write(java.io.DataOutput stream)
throws java.lang.Exception
stream - The output to write tojava.lang.Exception - if writing fails for some reasonpublic void read(java.io.DataInput stream)
throws java.lang.Exception
stream - The input to read fromjava.lang.Exception - if reading fails for some reasonpublic void write(com.google.gson.JsonObject main)
throws java.lang.Exception
main - The json object to write tojava.lang.Exception - if writing fails for some reasonpublic void read(com.google.gson.JsonObject main)
throws java.lang.Exception
main - The json object to read fromjava.lang.Exception - if reading fails for some reason