|
ContentsBasic methodsdata T a Type of lists. new :: () -> <Proc> ArrayList.T a Constructs a new list. add :: ArrayList.T a -> a -> <Proc> () Adds an element to the list. remove :: ArrayList.T a -> Integer -> <Proc> a Removes the i:th element of the list get :: ArrayList.T a -> Integer -> <Proc> a Gets the i:th element of the list. length :: ArrayList.T a -> <Proc> Integer The current length of the list. contains :: ArrayList.T a -> a -> <Proc> Boolean Iterationiter :: (a -> <b> ()) -> ArrayList.T a -> <Proc,b> () Iterates thru the list. The elements added during the iteration are also iterated. for :: ArrayList.T a -> (a -> <b> ()) -> <Proc,b> () 'iter' with swapped parameter. mapInPlace :: (a -> <b> a) -> ArrayList.T a -> <Proc,b> ArrayList.T a Replaces every element of the list by the result of applying the element to the given function. popUntilEmpty :: ArrayList.T a -> (a -> <b> ()) -> <Proc,b> () Pops the last element of the list until list becomes empty. Undocumented entitiesaddAll :: ArrayList.T a -> [a] -> <Proc> () freeze :: ArrayList.T a -> <Proc> [a] Converts the mutable list into immutable list. The original list must not be modified anymore. fromList :: [a] -> <Proc> ArrayList.T a newC :: Integer -> <Proc> ArrayList.T a Constructs a new list with initial capacity. set :: ArrayList.T a -> Integer -> a -> <Proc> a Sets the i:th element of the list. |