The Integer interface

An Integer.T is an INTEGER. This interface is intended to be used to instantiate generic interfaces and modules such as Table and List.

INTERFACE Integer;

IMPORT Word;

TYPE T = INTEGER;

CONST Brand = "Integer";

PROCEDURE Equal(a, b: T): BOOLEAN;

Return a = b.

PROCEDURE Hash(a: T): Word.T;

Return a.

PROCEDURE Compare(a, b: T): [-1..1];

Return -1 if a < b", "0" if "a = b", or "+1" if "a > b.

END Integer.