org.jmlspecs.samples.list.node2
Class Link
java.lang.Object
org.jmlspecs.samples.list.node2.Link
- Direct Known Subclasses:
- DualLink
- public class Link
- extends Object
Class Specifications |
protected represents node <- this.node_;
protected represents entries <- entriesMap(this); |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this); |
entries
public JMLObjectSequence entries
- Specifications:
datagroup contains: node org.jmlspecs.samples.list.node2.DualLink.prevEntries
node
public OneWayNode node
- Specifications: nullable
is in groups: entries
datagroup contains: node_ org.jmlspecs.samples.list.node2.DualLink.dualNode
node_
protected OneWayNode node_
- Specifications: nullable
is in groups: node
Link
public Link()
- Specifications: (class)pure
-
public normal_behavior
assignable entries;
ensures this.node == null;
Link
public Link(nullable OneWayNode node)
- Specifications: (class)pure
-
public normal_behavior
assignable entries;
ensures this.node == node;
entriesMap
public static JMLObjectSequence entriesMap(Link link)
- Specifications: pure
-
protected normal_behavior
requires link.node != null;
ensures \result .equals(entriesMap(link.getNext()).insertFront(link.getEntry()));
- also
-
requires link == null;
ensures \result .equals(new org.jmlspecs.models.JMLObjectSequence());
getEntry
public Object getEntry()
- Specifications: nullable (class)pure
-
public normal_behavior
assignable \nothing;
ensures \result == this.node.getEntry();
getNext
public Link getNext()
- Specifications: nullable (class)pure
-
public normal_behavior
assignable \nothing;
ensures \result .node == this.node.nextNode;
toString
public String toString()
- Overrides:
toString
in class Object
- Specifications: (class)pure
- Specifications inherited from overridden method in class Object:
non_null -
public normal_behavior
assignable objectState;
ensures \result != null&&\result .equals(this.theString);
ensures (* \result is a string representation of this object *);
- also
-
public code normal_behavior
assignable \nothing;
ensures \result != null&&(* \result is the instance's class name, followed by an @, followed by the instance's hashcode in hex *);
- also
-
public code model_program { ... }
- implies_that
-
assignable objectState;
ensures \result != null;
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.