public class SPDatabase extends java.lang.Object implements java.lang.Iterable<Mod>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
dateDelim
Delimiter used in separating modname from date in storage files.
|
Modifier and Type | Method and Description |
---|---|
static void |
add(Mod m)
Adds a mod to the database.
|
static void |
add(java.util.Set<Mod> modSet)
Adds a set of mods to the database.
|
static void |
exportModList(java.lang.String path)
Exports the mod load order to "Files/Last Modlist.txt"
Used for checking if patches are needed. |
static java.util.ArrayList<ModListing> |
getImportedModListings() |
static java.util.ArrayList<Mod> |
getImportedMods() |
static MajorRecord |
getMajor(FormID query)
Querys the Global Database and returns the first record that matches the
FormID.
|
static MajorRecord |
getMajor(FormID query,
GRUP_TYPE... grup_types)
Querys the Global Database and returns the first record that matches the
FormID.
|
static Mod |
getMod(int index)
Returns the nth mod in the database.
|
static Mod |
getMod(ModListing listing) |
static java.util.ArrayList<java.lang.String> |
getModListDates() |
static java.util.ArrayList<ModListing> |
getMods() |
static boolean |
hasMod(ModListing listing) |
java.util.Iterator<Mod> |
iterator() |
static int |
modIndex(ModListing listing)
Returns the modindex matching the ModListing.
|
static int |
numMods()
Returns the number of mods currently loaded into this SPDatabase
|
static boolean |
queryMajor(FormID query)
Querys the Global Database and returns whether the FormID exists.
NOTE: it is recommended you use the version that only searches in specific GRUPs for speed reasons. |
static boolean |
queryMajor(FormID query,
GRUP_TYPE... grup_types)
Querys the Global Database and returns whether the FormID exists.
|
static void |
removeMod(ModListing listing) |
java.util.Iterator<Mod> |
reverseIter() |
public static final java.lang.String dateDelim
public static int modIndex(ModListing listing)
listing
- ModListing object to query for.public static Mod getMod(ModListing listing)
listing
- ModListing object to query for.public static boolean hasMod(ModListing listing)
listing
- ModListing object to query for.public static void removeMod(ModListing listing)
listing
- ModListing to remove.public static Mod getMod(int index)
index
- public static java.util.ArrayList<ModListing> getMods()
public static java.util.ArrayList<ModListing> getImportedModListings()
public static java.util.ArrayList<Mod> getImportedMods()
public static void exportModList(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public static java.util.ArrayList<java.lang.String> getModListDates()
public static int numMods()
public static boolean queryMajor(FormID query)
query
- FormID to look for.public static boolean queryMajor(FormID query, GRUP_TYPE... grup_types)
query
- FormID to look for.grup_types
- GRUPs to look in.public static MajorRecord getMajor(FormID query)
query
- FormID to look for.public static MajorRecord getMajor(FormID query, GRUP_TYPE... grup_types)
query
- FormID to look for.grup_types
- GRUPs to look in.public static void add(Mod m)
m
- Mod to add to the database.public static void add(java.util.Set<Mod> modSet)
modSet
- Set of mods to add into the database.public java.util.Iterator<Mod> iterator()
iterator
in interface java.lang.Iterable<Mod>
public java.util.Iterator<Mod> reverseIter()