// @(#) $Id: E_OneWayList.refines-jml,v 1.8 2005/12/24 21:20:31 chalin Exp $ // Copyright (C) 1998, 1999 Iowa State University // This file is part of JML // JML is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // JML is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with JML; see the file COPYING. If not, write to // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // Author: Clyde Ruby package org.jmlspecs.samples.list.list2; //@ refine "E_OneWayList.java"; import org.jmlspecs.samples.list.node.OneWayNode; // FIXME: adapt this file to non-null-by-default and remove the following modifier. /*@ nullable_by_default @*/ public class E_OneWayList extends OneWayList { /*@ also @ protected code normal_behavior @ requires \same; @ accessible \nothing; @ captures \nothing; @ callable super(); @*/ public E_OneWayList(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ captures \nothing; @ callable \nothing; @*/ public /*@ pure @*/ int length(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ captures \nothing; @ callable \nothing; @*/ public /*@ pure @*/ boolean isEmpty(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible obj.*, theListNode_.entries; @ captures \nothing; @ callable OneWayNode.getEntry(), OneWayNode.getNextNode(); @*/ public /*@ pure @*/ boolean equals(/*@ nullable @*/ Object obj); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ captures \nothing; @ callable super.removeEntry(); @*/ public void removeEntry(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ captures newEntry; @ callable super.insertAfterCursor(Object ); @*/ public void insertAfterCursor(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ captures newEntry; @ callable previousNode(OneWayNode, OneWayNode), @ cursorNode_.insertAfter(Object), incrementCursor(); @*/ public void insertBeforeCursor(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible \nothing; @ captures newEntry; @ callable lastEntry(), isOffEnd(), insertBeforeCursor(Object), @ insertAfterCursor(Object), incrementCursor(); @*/ public void append(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible \nothing; @ captures \nothing; @ callable firstEntry(), isOffEnd(), removeEntry(), @ incrementCursor(); @*/ public void removeAllEntries(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible this; @ captures theList; @ callable new E_OneWayList(E_OneWayList ); @*/ public /*@ non_null @*/ Object clone(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible cursorNode_; @ captures \nothing; @ callable isOffEnd(), cursorNode_.getNextNode(), incrementCursor(); @*/ protected void lastEntry(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_, othLst.*; @ captures othLst.theList; @ callable super(OneWayList), othLst.length(); @*/ protected E_OneWayList(E_OneWayList othLst); }