Package net.sf.freecol.common.io
Class FreeColTcFile
- java.lang.Object
-
- net.sf.freecol.common.io.FreeColDataFile
-
- net.sf.freecol.common.io.FreeColModFile
-
- net.sf.freecol.common.io.FreeColTcFile
-
- All Implemented Interfaces:
ObjectWithId
public class FreeColTcFile extends FreeColModFile
A Total Conversion (TC). Rules are TCs.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,FreeColTcFile>
allTCs
A cache of all the TCs.private static java.util.logging.Logger
logger
-
Fields inherited from class net.sf.freecol.common.io.FreeColModFile
SPECIFICATION_FILE
-
Fields inherited from class net.sf.freecol.common.io.FreeColDataFile
ZIP_FILE_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description FreeColTcFile(java.io.File file)
Opens the given file for reading.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FreeColTcFile
getFreeColTcFile(java.lang.String id)
Get a TC by id.ResourceMapping
getResourceMapping()
Creates aResourceMapping
from the available resource files.static java.util.List<FreeColTcFile>
getRulesList()
Get all the standard rule sets.static void
loadTCs()
Require all TCs to be loaded.-
Methods inherited from class net.sf.freecol.common.io.FreeColModFile
getFreeColModFile, getId, getModsList, getParent, getSpecification, getSpecificationInputStream, loadMods, readModDescriptor
-
Methods inherited from class net.sf.freecol.common.io.FreeColDataFile
getFileFilter, getInputStream, getPath, getURI
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
allTCs
private static final java.util.Map<java.lang.String,FreeColTcFile> allTCs
A cache of all the TCs.
-
-
Method Detail
-
getResourceMapping
public ResourceMapping getResourceMapping()
Creates aResourceMapping
from the available resource files.- Overrides:
getResourceMapping
in classFreeColDataFile
- Returns:
- A
ResourceMapping
ornull
there is no resource mapping file.
-
getRulesList
public static java.util.List<FreeColTcFile> getRulesList()
Get all the standard rule sets.- Returns:
- A list of
FreeColTcFile
s holding the rule sets.
-
loadTCs
public static void loadTCs()
Require all TCs to be loaded.
-
getFreeColTcFile
public static FreeColTcFile getFreeColTcFile(java.lang.String id)
Get a TC by id.- Parameters:
id
- The TC file identifier to look for.- Returns:
- The
FreeColTcFile
found, or null if none present.
-
-