public abstract class JsonListFile extends Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
JsonListFile.BaseEntry
Base interface for entries in JSON list files.
|
Modifier and Type | Field and Description |
---|---|
protected List<JsonListFile.BaseEntry> |
entries
The list as we currently know it.
|
Constructor and Description |
---|
JsonListFile(File file)
Initialize the list from the given file.
|
Modifier and Type | Method and Description |
---|---|
void |
load()
Reloads from the file.
|
protected abstract JsonListFile.BaseEntry |
readEntry(Map<String,String> object)
Deserialize an entry from JSON format.
|
protected void |
save()
Saves to the file.
|
protected final List<JsonListFile.BaseEntry> entries
public JsonListFile(File file)
file
- The file to use for this list.public void load()
protected void save()
protected abstract JsonListFile.BaseEntry readEntry(Map<String,String> object)
object
- The JSON object to read from.Copyright © 2021. All rights reserved.