|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Common protocol of the JML model collection types.
The use of elementType and containsNull in this specification
follows the ESC/Java specification of Collection
.
That is, these ghost fields are used by the user of the object to
state what types of objects are allowed to be added to the collection,
and hence what is guaranteed to be retrieved from the collection. They
are not adjusted by methods based on the content of the collection.
JMLEnumeration
,
JMLIterator
Class Specifications |
instance public constraint this.elementType == \old(this.elementType); instance public constraint this.containsNull == \old(this.containsNull); |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT; public represents _getClass <- \typeof(this); |
Model Field Summary | |
[instance] JMLDataGroup |
elementState
The objectState of all elements is contained in elementState. |
Ghost Field Summary | |
[instance] boolean |
containsNull
Whether this collection can contain null elements; think of it as "is allowed to contain null". |
[instance] Class |
elementType
The type of the elements in this collection. |
Model Method Summary | |
\bigint |
size()
Tell the number of elements in this collection. |
Method Summary | |
boolean |
has(nullable Object elem)
Tell whether the argument is equal to one of the elements in this collection, using the notion of element equality appropriate for the collection. |
int |
int_size()
|
JMLIterator |
iterator()
Returns an Iterator over this object. |
Methods inherited from interface org.jmlspecs.models.JMLType |
clone, equals, hashCode |
Model Field Detail |
public JMLDataGroup elementState
Ghost Field Detail |
public Class elementType
public boolean containsNull
Model Method Detail |
public \bigint size()
Method Detail |
public JMLIterator iterator()
public boolean has(nullable Object elem)
public int int_size()
|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |