Class ModuleSetManager<baseModule>


  • public class ModuleSetManager<baseModule>
    extends java.lang.Object
    the ModuleSetManager class is used to store and use module objects. the type argument is the baseclass module type that the ModuleSetManager will manage
    • Constructor Summary

      Constructors 
      Constructor Description
      ModuleSetManager​(java.lang.Class<baseModule> baseClass)
      the module base class object should define all of the method hooks that modules can use, the behavior of the base class object will be ignored
    • Method Summary

      Modifier and Type Method Description
      void AddModule​(baseModule newMod)
      adds a module to the ModuleSetManager.
      int CountModsWithMethod​(java.lang.String methodName)  
      java.lang.Iterable<baseModule> Iter​(java.lang.String methodName)
      use with foreach loop to iterate over modules that override a given method.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • baseClass

        public java.lang.Class<baseModule> baseClass
      • moduleLists

        public java.util.HashMap<java.lang.String,​java.util.ArrayList<baseModule>> moduleLists
      • methodNames

        public java.util.ArrayList<java.lang.String> methodNames
      • modules

        public java.util.ArrayList<baseModule> modules
    • Constructor Detail

      • ModuleSetManager

        public ModuleSetManager​(java.lang.Class<baseModule> baseClass)
        the module base class object should define all of the method hooks that modules can use, the behavior of the base class object will be ignored
    • Method Detail

      • AddModule

        public void AddModule​(baseModule newMod)
        adds a module to the ModuleSetManager. the module should override any functions in the baseClass that the will be used with the model
      • Iter

        public java.lang.Iterable<baseModule> Iter​(java.lang.String methodName)
        use with foreach loop to iterate over modules that override a given method. used to run the module functions when appropriate
      • CountModsWithMethod

        public int CountModsWithMethod​(java.lang.String methodName)