Class TerrainRecruitLoader.NullTerrainRecruitLoader

java.lang.Object
net.sf.colossus.xmlparser.TerrainRecruitLoader.NullTerrainRecruitLoader
All Implemented Interfaces:
IVariantInitializer
Enclosing class:
TerrainRecruitLoader

public static class TerrainRecruitLoader.NullTerrainRecruitLoader extends Object implements IVariantInitializer
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • showNullWarning

      private final boolean showNullWarning
  • Constructor Details

    • NullTerrainRecruitLoader

      public NullTerrainRecruitLoader(boolean showNullWarning)
      Create an do-basically-Nothing TerrainRecruitLoader that can be used as TerrainInitialiser e.g. during Unit Testing. In real games normally a real TerrainRecruitLoader should be used, accessed via the IVariantInitializer interface. But the variable to hold the trl should be initialized with something to avoid NPEs... This one here serves that purpose, but it will then show warnings when querying values from it.
      Parameters:
      showNullWarning - Set to true if you really want to use the defaults and not get warnings about querying them. Intended for unit testing setup.
    • NullTerrainRecruitLoader

      public NullTerrainRecruitLoader()
  • Method Details