public class UserList<K,V extends UserListEntry<K>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
UserList.Serializer |
Modifier and Type | Field and Description |
---|---|
protected com.google.gson.Gson |
gson |
private boolean |
lanServer |
protected static org.apache.logging.log4j.Logger |
LOGGER |
private java.io.File |
saveFile |
private static java.lang.reflect.ParameterizedType |
USER_LIST_ENTRY_TYPE |
private java.util.Map<java.lang.String,V> |
values |
Constructor and Description |
---|
UserList(java.io.File saveFile) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(V entry) |
protected UserListEntry<K> |
createEntry(com.google.gson.JsonObject entryData) |
java.util.Collection<V> |
getEntries() |
V |
getEntry(K obj) |
java.lang.String[] |
getKeys() |
protected java.lang.String |
getObjectKey(K obj) |
java.io.File |
getSaveFile() |
protected boolean |
hasEntry(K entry) |
boolean |
isEmpty() |
boolean |
isLanServer() |
void |
readSavedFile() |
void |
removeEntry(K entry) |
void |
removeEntry(UserListEntry<K> p_199042_1_) |
private void |
removeExpired() |
void |
setLanServer(boolean state) |
void |
writeChanges() |
protected static final org.apache.logging.log4j.Logger LOGGER
protected final com.google.gson.Gson gson
private final java.io.File saveFile
private final java.util.Map<java.lang.String,V extends UserListEntry<K>> values
private boolean lanServer
private static final java.lang.reflect.ParameterizedType USER_LIST_ENTRY_TYPE
public boolean isLanServer()
public void setLanServer(boolean state)
public java.io.File getSaveFile()
public void addEntry(V entry)
public void removeEntry(K entry)
public void removeEntry(UserListEntry<K> p_199042_1_)
public java.lang.String[] getKeys()
public boolean isEmpty()
protected java.lang.String getObjectKey(K obj)
protected boolean hasEntry(K entry)
private void removeExpired()
protected UserListEntry<K> createEntry(com.google.gson.JsonObject entryData)
public java.util.Collection<V> getEntries()
public void writeChanges() throws java.io.IOException
java.io.IOException
public void readSavedFile() throws java.io.FileNotFoundException
java.io.FileNotFoundException