Package edu.wisc.game.engine

## Class AllRuleSets

- java.lang.Object
- - java.util.AbstractMap<K,​V>
  - - java.util.HashMap<String,​RuleSet>
    - - edu.wisc.game.engine.AllRuleSets

- All Implemented Interfaces:
    `Serializable`, `Cloneable`, `Map<String,​RuleSet>`

      public class AllRuleSets
      extends HashMap<String,​RuleSet>

  Stores rule sets, and allows lookup by name. FIXME: need a web UI for calling clear() on this table, whenever a new version of the same rule set file is created.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K extends Object,​V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,​V extends Object>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K extends Object,​V extends Object>`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AllRuleSets()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `clearAll()` | Can be used to ensure that the rule sets will be reloaded
    `static RuleSet` | `obtain​(String ruleSetName)` |
    `static RuleSet` | `read​(File f)` |

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### AllRuleSets

          public AllRuleSets()

  - ### Method Detail

    - #### read

          public static RuleSet read​(File f)
                              throws IOException,
                                     RuleParseException

      Throws:
        `IOException`
        `RuleParseException`

    - #### obtain

          public static RuleSet obtain​(String ruleSetName)
                                throws IOException,
                                       RuleParseException

      Parameters:
        `ruleSetName` - Either a name with no path or extension (which will be mapped to a rule set file in the tomcat directory), or a full file path name (beginning with a "/" and ending in ".txt").
      Throws:
        `IOException`
        `RuleParseException`

    - #### clearAll

          public static void clearAll()

      Can be used to ensure that the rule sets will be reloaded