Package org.codehaus.groovy.tools.gse

# 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:
  - 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>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringSetMap()`
  Creates an empty map.
  `StringSetMap(StringSetMap other)`
  Creates a copy of another string-set map.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<String>`
  `get(Object o)`
  Returns the set for the supplied key, creating it if necessary.
  `void`
  `makeTransitiveHull()`
  Expands the relation represented by this map to its transitive closure.

  ### Methods inherited from class java.util.LinkedHashMap

  `clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values`

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

  `clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

  ### 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

  `compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

- ## 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.