JML

org.jmlspecs.samples.table
Class TableImplementation

java.lang.Object
  extended byorg.jmlspecs.samples.table.TableImplementation
All Implemented Interfaces:
Table

public class TableImplementation
extends Object
implements Table

An implementation of the Table interface.

Author:
Katie Becker, Gary T. Leavens

Field Summary
private  Hashtable table
          The representation of this Table.
 
Constructor Summary
TableImplementation()
          Return the set of entries that are, abstractly, in this Table.
 
Method Summary
 void addEntry(Entry e)
          Add the given entry to this table.
 boolean isUsedIndex(JMLType d)
          The model of the entries (rows) in the table.
 JMLType mapTo(JMLType d)
          Return the value at the given index.
 void removeEntry(JMLType d)
          Take out the given entry from this table.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

private Hashtable table
The representation of this Table.

Constructor Detail

TableImplementation

public TableImplementation()
Return the set of entries that are, abstractly, in this Table. Initialize this Table to contain the empty set of entries.

Method Detail

isUsedIndex

public boolean isUsedIndex(JMLType d)
Description copied from interface: Table
The model of the entries (rows) in the table. Is the given index used in the table?

Specified by:
isUsedIndex in interface Table

addEntry

public void addEntry(Entry e)
Description copied from interface: Table
Add the given entry to this table.

Specified by:
addEntry in interface Table

removeEntry

public void removeEntry(JMLType d)
Description copied from interface: Table
Take out the given entry from this table.

Specified by:
removeEntry in interface Table

mapTo

public JMLType mapTo(JMLType d)
Description copied from interface: Table
Return the value at the given index.

Specified by:
mapTo in interface Table

toString

public String toString()
Overrides:
toString in class Object

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.