net.walend.collection
Interface Bag

All Superinterfaces:
java.util.Collection, HasState
All Known Implementing Classes:
ImmutableBag, MapBag

public interface Bag
extends java.util.Collection, HasState

Bag is an interface for Collections that are just simple Collections.

Author:
David Walend dfw1@cornell.edu

Field Summary
static Bag EMPTY
           
 
Method Summary
 int countObjects(java.lang.Object inBag)
          Returns the count of objects in the bag.
 boolean sameContentsAs(Bag bag)
          Returns true if this contains the same numbers of the same objects as bag.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Field Detail

EMPTY

public static final Bag EMPTY
Method Detail

countObjects

public int countObjects(java.lang.Object inBag)
Returns the count of objects in the bag.


sameContentsAs

public boolean sameContentsAs(Bag bag)
Returns true if this contains the same numbers of the same objects as bag.



Copyright (c) 2001, 2002, David Walend