org.glassfish.gmbal.generic
Class MultiSet<E>

java.lang.Object
  extended by org.glassfish.gmbal.generic.MultiSet<E>

public class MultiSet<E>
extends Object

A simple abstraction of a MultiSet, that is, a "set" that can contain more than one copy of the same element. I am implementing only the bare minimum that is required for now.


Constructor Summary
MultiSet()
           
 
Method Summary
 void add(E element)
           
 boolean contains(E element)
           
static void main(String[] args)
           
 void remove(E element)
           
 int size()
          Return the number of unique elements in this MultiSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSet

public MultiSet()
Method Detail

add

public void add(E element)

remove

public void remove(E element)

contains

public boolean contains(E element)

size

public int size()
Return the number of unique elements in this MultiSet.


main

public static void main(String[] args)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.