Class MultiSet<T>

java.lang.Object
net.sf.colossus.util.MultiSet<T>

public class MultiSet<T> extends Object
Class MultiSet is a set that can contain more than one of the same element, built around a HashMap that maps objects to Integer counts.
  • Field Details

  • Constructor Details

    • MultiSet

      public MultiSet()
  • Method Details

    • add

      public void add(T key)
    • remove

      public boolean remove(T key)
      Remove one of key from the set, if present. Return true iff it was present.
    • size

      public int size()
    • contains

      public boolean contains(T key)
    • count

      public int count(T key)
    • keySet

      public Collection<T> keySet()
    • values

      public Collection<Integer> values()
    • isEmpty

      public boolean isEmpty()
    • max

      public int max()