Make Database return a read-only list on getKeys()

Also move some stuff around
This commit is contained in:
Alexander Bakker 2017-12-04 21:21:31 +01:00
parent b3079dabc2
commit 4e10e5d514
6 changed files with 11 additions and 11 deletions

View file

@ -4,6 +4,7 @@ import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Database {
@ -49,6 +50,6 @@ public class Database {
}
public List<DatabaseEntry> getKeys() {
return _entries;
return Collections.unmodifiableList(_entries);
}
}