Registers a new item set with a single item. Returns the new item set. Throws if such an item set already exists.
(T item)
| 63 | * Throws if such an item set already exists. |
| 64 | */ |
| 65 | public Set<T> makeSet(T item) { |
| 66 | if (itemSets_.containsKey(item)) { |
| 67 | throw new IllegalStateException( |
| 68 | "Item set for item already exists: " + item.toString()); |
| 69 | } |
| 70 | Set<T> s = Sets.newHashSet(item); |
| 71 | itemSets_.put(item, s); |
| 72 | uniqueSets_.put(s, DUMMY_VALUE); |
| 73 | return s; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Merges the two item sets belonging to the members a and b. The merged set contains |