JML

org.jmlspecs.models
Class JMLValueBagSpecs

java.lang.Object
  extended byorg.jmlspecs.models.JMLValueBagSpecs
All Implemented Interfaces:
Cloneable, JMLType, JMLValueType, Serializable
Direct Known Subclasses:
JMLValueBag

public abstract class JMLValueBagSpecs
extends Object
implements JMLValueType

Special behavior for JMLValueBag not shared by JMLObjectBag.

Version:
$Revision: 1.16 $
Author:
Gary T. Leavens, with help from Clyde Ruby, and others.
See Also:
JMLValueType, JMLValueBag

Constructor Summary
JMLValueBagSpecs()
           
 
Method Summary
abstract  Object clone()
          Return a deep copy of this object.
 int count(Object elem)
          Tell many times the argument occurs ".equals" to one of the values in this bag.
abstract  int count(JMLType elem)
          Tell many times the argument occurs ".equals" to one of the values in this bag.
 boolean has(Object elem)
          Is the argument ".equals" to one of the values in this bag.
abstract  boolean has(JMLType elem)
          Is the argument ".equals" to one of the values in this bag.
abstract  JMLValueBag insert(JMLType elem)
          How many times does the argument occur as an objects representing values in the bag?
abstract  JMLValueBag insert(JMLType elem, int cnt)
          Returns a new bag that contains all the elements of this and also the given argument.
abstract  int int_size()
          Tells the number of elements in the bag.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jmlspecs.models.JMLValueType
equals
 
Methods inherited from interface org.jmlspecs.models.JMLType
hashCode
 

Constructor Detail

JMLValueBagSpecs

public JMLValueBagSpecs()
Method Detail

has

public abstract boolean has(JMLType elem)
Is the argument ".equals" to one of the values in this bag.

See Also:
has(Object), count(JMLType)

has

public boolean has(Object elem)
Is the argument ".equals" to one of the values in this bag.

See Also:
has(JMLType), count(Object)

count

public abstract int count(JMLType elem)
Tell many times the argument occurs ".equals" to one of the values in this bag.

See Also:
count(Object), has(JMLType)

count

public int count(Object elem)
Tell many times the argument occurs ".equals" to one of the values in this bag.

See Also:
count(JMLType), has(Object)

int_size

public abstract int int_size()
Tells the number of elements in the bag.


clone

public abstract Object clone()
Description copied from interface: JMLValueType
Return a deep copy of this object.

Specified by:
clone in interface JMLValueType
Overrides:
clone in class Object

insert

public abstract JMLValueBag insert(JMLType elem)
How many times does the argument occur as an objects representing values in the bag?

See Also:
Returns a new bag that contains all the elements of this and also the given argument., insert(JMLType, int)

insert

public abstract JMLValueBag insert(JMLType elem,
                                   int cnt)
                            throws IllegalArgumentException
Returns a new bag that contains all the elements of this and also the given argument.

Throws:
IllegalArgumentException
See Also:
insert(JMLType)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.