## org.eclipse.ocl.util
Interface Bag<E>

All Superinterfaces:
  Collection<E>, Iterable<E>

    public interface Bag<E>

extends Collection<E>

A bag is a collection that is non-unique and unordered. It is, therefore, like a set except that any element may occur multiple times.

Method Summary
`int` `count(Object o)` Queries how many times the specified object occurs in me.

Methods inherited from interface java.util.Collection
`add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray`

Method Detail

### count

    int count(Object o)

  Queries how many times the specified object occurs in me. If I do not contain the object, then the count is zero.

  Parameters:
    `o` - an object
  Returns:
    the number of times that it occurs in me

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.