jade.util.leap
Interface Collection

All Known Subinterfaces:
List, Set, SortedSet

public interface Collection

The root of the LEAP Collection hierarchy.


Method Summary
 boolean add(java.lang.Object o)
          Adds an element.
 boolean isEmpty()
          Checks if the collection contains elements.
 Iterator iterator()
          Returns an iterator over the elements in this collection.
 boolean remove(java.lang.Object o)
          Removes one instance of the specified element.
 int size()
          Returns the number of elements in this collection.
 java.lang.Object[] toArray()
          Returns an array containing all of the elements in this collection.
 

Method Detail

add

public boolean add(java.lang.Object o)
Adds an element.
Returns:
true if the element has been added.

isEmpty

public boolean isEmpty()
Checks if the collection contains elements.
Returns:
true if this collection contains no elements

remove

public boolean remove(java.lang.Object o)
Removes one instance of the specified element.
Parameters:
o - the element to be removed
Returns:
true if the element has been removed

iterator

public Iterator iterator()
Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned.
Returns:
an Iterator over the elements in this collection

toArray

public java.lang.Object[] toArray()
Returns an array containing all of the elements in this collection.
Returns:
an array containing all of the elements in this collection

size

public int size()
Returns the number of elements in this collection.
Returns:
the number of elements in this collection.