org.jmlspecs.samples.list.node2
Class DualLink
java.lang.Object
org.jmlspecs.samples.list.node2.Link
org.jmlspecs.samples.list.node2.DualLink
- public class DualLink
- extends Link
Class Specifications |
protected invariant (this.node == null||this.node instanceof org.jmlspecs.samples.list.node2.TwoWayNode)&&this.node == this.dualNode;
protected invariant this.node == this.dualNode;
protected represents dualNode <- this.dualNode_;
protected represents prevEntries <- this.prevEntriesMap(this); |
Specifications inherited from class Link |
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); |
Model fields inherited from class org.jmlspecs.samples.list.node2.Link |
entries, node |
Fields inherited from class org.jmlspecs.samples.list.node2.Link |
node_ |
Model methods inherited from class org.jmlspecs.samples.list.node2.Link |
entriesMap |
prevEntries
public JMLObjectSequence prevEntries
- Specifications:
is in groups: entries
datagroup contains: dualNode
dualNode
public TwoWayNode dualNode
- Specifications: nullable
is in groups: prevEntries node
datagroup contains: dualNode_
dualNode_
protected TwoWayNode dualNode_
- Specifications: nullable
is in groups: dualNode
DualLink
public DualLink()
- Specifications: (class)pure
-
public normal_behavior
assignable entries;
ensures this.node == null;
DualLink
public DualLink(nullable TwoWayNode node)
- Specifications: (class)pure
-
public normal_behavior
assignable entries;
ensures this.dualNode == node;
prevEntriesMap
protected JMLObjectSequence prevEntriesMap(nullable DualLink link)
- Specifications: pure
-
protected normal_behavior
requires link != null&&link.getEntry() != null;
ensures \result .equals(this.prevEntriesMap(link.getPrevious()).insertBack(link.getEntry()));
- also
-
requires link == null;
ensures \result .equals(new org.jmlspecs.models.JMLObjectSequence());
getPrevious
public DualLink getPrevious()
- Specifications: nullable (class)pure
-
public normal_behavior
requires this.dualNode == null;
assignable \nothing;
ensures \result == null;
- also
-
public normal_behavior
requires this.dualNode != null;
assignable \nothing;
ensures \result .dualNode == this.dualNode.prevNode;
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.