Method Summary |
|
public JMLType | choose() Return an arbitrary element of this. |
public Object | clone() Return a clone of this object. |
public boolean | containsAll(java.util.Collection c) Tell whether, for each element in the given collection, there is a
".equals" element in this bag. |
public static JMLValueBag | convertFrom(JMLType[] a) Return the bag containing all the elements in the given array. |
public static JMLValueBag | convertFrom(java.util.Collection c) Return the bag containing all the value in the
given collection. |
public static JMLValueBag | convertFrom(JMLCollection c) Return the bag containing all the value in the
given JMLCollection. |
public int | count(JMLType elem) Tell how many times the given element occurs ".equals"
to an element in this bag.
Parameters: elem - the element sought. |
public JMLValueBag | difference(JMLValueBag b2) Return a bag containing the items in this bag minus the
items in the given bag. |
public JMLValueBagEnumerator | elements() Returns an Enumeration over this bag. |
public boolean | equals(Object b2) Test whether this object's value is equal to the given argument. |
protected JMLValueBagEntry | getMatchingEntry(JMLType item) Find a JMLValueBagEntry that is for the same element, if possible.
Parameters: item - the item sought. |
public boolean | has(JMLType elem) Tell whether the given element occurs ".equals"
to an element in this bag. |
public int | hashCode() |
public JMLValueBag | insert(JMLType elem) Return a bag containing the given item and the ones in
this bag. |
public JMLValueBag | insert(JMLType elem, int cnt) Return a bag containing the given item the given number of
times, in addition to the ones in this bag. |
public int | int_size() Tell the number of elements in this bag. |
public JMLValueBag | intersection(JMLValueBag b2) Return a bag containing the items in both this bag and the
given bag. |
public boolean | isEmpty() Tell whether this bag has no elements. |
public boolean | isProperSubbag(JMLValueBag b2) Tells whether every item in this bag is contained in the
argument, but the argument is strictly larger. |
public boolean | isProperSuperbag(JMLValueBag b2) Tells whether every item in the argument is contained in this bag
argument, but this bag is strictly larger. |
public boolean | isSubbag(JMLValueBag b2) Tells whether every item in this bag is contained in the argument. |
public boolean | isSuperbag(JMLValueBag b2) Tells whether every item in the argument is contained in this bag. |
public JMLIterator | iterator() Returns an iterator over this bag. |
public JMLValueBag | remove(JMLType elem) Return a bag containing the items in this bag except for
one of the given element. |
public JMLValueBag | remove(JMLType elem, int cnt) Return a bag containing the items in this bag, except for
the given number of the given element. |
public JMLValueBag | removeAll(JMLType elem) Return a bag containing the items in this bag, except for
all items that are ".equals" to the given item. |
public static JMLValueBag | singleton(JMLType e) Return the singleton bag containing the given element. |
public JMLType[] | toArray() Return a new array containing all the elements of this. |
public JMLValueSequence | toSequence() Return a new JMLValueSequence containing all the elements of this. |
public JMLValueSet | toSet() Return a new JMLValueSet containing all the elements of this. |
public String | toString() Return a string representation of this object. |
public JMLValueBag | union(JMLValueBag b2) Return a bag containing the items in either this bag or the
given bag. |