[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

IntegerList

inherits from FixedList

Object <- FixedList <- IntegerList



Operations

Get list of all operations

AddIntegerAt
AddIntegerLast
FindInteger
IntegerAt
ReplaceIntegerAt


Attributes

Get list of all attributes

InitialListWordFormat


Fields

No fields are defined by IntegerList or any of its superclasses.


Instance template

instance IntegerList tag;
end instance;

Class definition

Define Class IntegerList;
    inherits from FixedList;
    uses extra list: Signed;
    
    // getting
    operation IntegerAt(index: Unsigned): Unsigned, noFail;
        // get the value of a single integer in the list
    
    // adding and removing
    operation ReplaceIntegerAt(index: Unsigned; integer: Unsigned);
        // overwrite the integer at position <index>, leaving the list the same length
    operation AddIntegerAt(index: Unsigned; integer: Unsigned);
        // insert an integer into the list at position <index>
    operation AddIntegerLast(integer: Unsigned);
        // insert an integer at the end of the list
    
    // finding
    operation FindInteger(integer: Unsigned): Unsigned, noFail;
        // returns the index of the integer if found, zero if not

    overrides InitialListWordFormat;
        // returns integerWord to express the fact that integer lists
        // hold integers
end class;