Class StringSetMap

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,Set<String>>
org.codehaus.groovy.tools.gse.StringSetMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Set<String>>

public class StringSetMap extends LinkedHashMap<String,Set<String>>
Map from string keys to lazily created sets of strings.
See Also:
  • Constructor Details

    • StringSetMap

      public StringSetMap()
      Creates an empty map.
    • StringSetMap

      public StringSetMap(StringSetMap other)
      Creates a copy of another string-set map.
      Parameters:
      other - the map to copy
  • Method Details

    • get

      public Set<String> get(Object o)
      Returns the set for the supplied key, creating it if necessary.
      Specified by:
      get in interface Map<String,Set<String>>
      Overrides:
      get in class LinkedHashMap<String,Set<String>>
      Parameters:
      o - the key whose set should be returned
      Returns:
      the existing or newly created set
    • makeTransitiveHull

      public void makeTransitiveHull()
      Expands the relation represented by this map to its transitive closure.