edu.stanford.nlp.util
Class TwoDimensionalSet<K1,K2>

java.lang.Object
  extended by edu.stanford.nlp.util.TwoDimensionalSet<K1,K2>
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<Pair<K1,K2>>

public class TwoDimensionalSet<K1,K2>
extends java.lang.Object
implements java.io.Serializable, java.lang.Iterable<Pair<K1,K2>>

Wrap a TwoDimensionalMap as a TwoDimensionalSet.

Author:
John Bauer
See Also:
Serialized Form

Constructor Summary
TwoDimensionalSet()
           
TwoDimensionalSet(TwoDimensionalMap<K1,K2,java.lang.Boolean> backingMap)
           
 
Method Summary
 boolean add(K1 k1, K2 k2)
           
 boolean addAll(TwoDimensionalSet<? extends K1,? extends K2> set)
           
 void clear()
           
 boolean contains(K1 k1, K2 k2)
           
 boolean containsAll(TwoDimensionalSet<? extends K1,? extends K2> set)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isEmpty()
           
 java.util.Iterator<Pair<K1,K2>> iterator()
          Iterate over the map using the iterator and entry inner classes.
 boolean remove(K1 k1, K2 k2)
           
 boolean removeAll(TwoDimensionalSet<? extends K1,? extends K2> set)
           
 int size()
           
static
<K1,K2> TwoDimensionalSet<K1,K2>
treeSet()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoDimensionalSet

public TwoDimensionalSet()

TwoDimensionalSet

public TwoDimensionalSet(TwoDimensionalMap<K1,K2,java.lang.Boolean> backingMap)
Method Detail

treeSet

public static <K1,K2> TwoDimensionalSet<K1,K2> treeSet()

add

public boolean add(K1 k1,
                   K2 k2)

addAll

public boolean addAll(TwoDimensionalSet<? extends K1,? extends K2> set)

clear

public void clear()

contains

public boolean contains(K1 k1,
                        K2 k2)

containsAll

public boolean containsAll(TwoDimensionalSet<? extends K1,? extends K2> set)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isEmpty

public boolean isEmpty()

remove

public boolean remove(K1 k1,
                      K2 k2)

removeAll

public boolean removeAll(TwoDimensionalSet<? extends K1,? extends K2> set)

size

public int size()

iterator

public java.util.Iterator<Pair<K1,K2>> iterator()
Iterate over the map using the iterator and entry inner classes.

Specified by:
iterator in interface java.lang.Iterable<Pair<K1,K2>>


Stanford NLP Group