public class SnapshotJson extends java.lang.Object implements java.lang.Comparable<SnapshotJson>
Modifier and Type | Class and Description |
---|---|
static class |
SnapshotJson.Entry |
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
GSON |
private java.lang.String |
latest |
static java.lang.String |
META_JSON_FILE |
private static java.util.Comparator<SnapshotJson.Entry> |
SORTER |
static java.text.DateFormat |
TIMESTAMP |
private java.util.List<SnapshotJson.Entry> |
versions |
Constructor and Description |
---|
SnapshotJson() |
Modifier and Type | Method and Description |
---|---|
void |
add(SnapshotJson.Entry data) |
int |
compareTo(SnapshotJson o) |
static SnapshotJson |
create(java.io.File target) |
java.lang.String |
getLatest() |
void |
merge(SnapshotJson o) |
boolean |
remove(java.lang.String timestamp) |
java.lang.String |
updateLatest() |
void |
write(java.io.File target) |
public static final java.text.DateFormat TIMESTAMP
public static final java.lang.String META_JSON_FILE
private static final com.google.gson.Gson GSON
private static final java.util.Comparator<SnapshotJson.Entry> SORTER
private java.lang.String latest
private java.util.List<SnapshotJson.Entry> versions
public static SnapshotJson create(java.io.File target)
public java.lang.String getLatest()
public void add(SnapshotJson.Entry data)
public void merge(SnapshotJson o)
public boolean remove(java.lang.String timestamp)
public java.lang.String updateLatest()
public void write(java.io.File target) throws java.io.IOException
java.io.IOException
public int compareTo(SnapshotJson o)
compareTo
in interface java.lang.Comparable<SnapshotJson>