# Section 8.5.3.1.1:
$CONTAINER

abstract class $CONTAINER{ETP} < $ELT{ETP}, $STR is -- This abstraction is the basic abstract container type. It does -- not have a create : SAME routine, since this does not make sense -- for arrays and other indexable types, where the create should take SAME -- as an argument. copy : SAME ; -- This routine returns a copy of the current container. size : CARD ; -- This is the number of elements actually contained. is_empty : BOOL ; -- This predicate returns true if and only if there are no elements when -- size is zero. has( elem : ETP ) : BOOL ; -- This routine returns true if and only if the element with the value -- elem is contained.

| Language Index |  | Library Index |  | Container Index

Comments or enquiries should be made to Keith Hopper . Page last modified: Thursday, 25 May 2000. |