abstract class $LIST{ETP} < $LISTS{ETP} is
-- This abstract class provides an extensible array abstraction. Similar
-- to a list abstraction, this has keys which are cardinal numbers. After
-- an insertion some keys may have changed.
append(
elem : ETP
) ;
-- This concatenates elem at the end of the existing list.
append(
elem : ETP
) : $LIST{ETP} ;
-- This concatenates elem at the end of a copy of the existing list
-- before returning the result..
append_all(
list : $CONTAINER{ETP}
) ;
-- This concatenates the given list after self.
append_all(
list : $CONTAINER{ETP}
) : $LIST{ETP} ;
-- This concatenates the given list after copying self and before
-- returning the resultant list.
insert_after(
index : CARD,
val : ETP
) ;
-- This inserts val immediately after the given index position. The
-- indices of all subwequent elements will have increased by one.
insert_before(
index : CARD,
val : ETP
) ;
-- This inserts the value val in the position immediately before the
-- given index. The indices of all subsequent elements will be increased
-- by one.
insert_all_before(
index : CARD,
val : $CONTAINER{ETP}
) ;
-- This inserts all of the items in val in order at the position before
-- the given index. All subsequent elements will have their index increased
-- by the number of elements in val.
insert_all_after(
index : CARD,
val : $CONTAINER{ETP}
) ;
-- This inserts all of the items in val in order at the position after
-- the given index. All subsequent elements will have their index increased
-- by the number of elements in val.