jade.util.leap
Interface Collection

All Known Subinterfaces:
List, Set, SortedSet
All Known Implementing Classes:
ArrayList, HashSet, LinkedList, SortedSetImpl

public interface Collection

The LEAP (environment-dependent) version of the &qote;java.util.Collection&qote; interface. This interface appears to be exactly the same in J2SE, PJAVA and MIDP. The internal implementation is different in the three cases however.


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

boolean add(java.lang.Object o)
Adds an element.

Returns:
true if the element has been added.

isEmpty

boolean isEmpty()
Checks if the collection contains elements.

Returns:
true if this collection contains no elements

remove

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

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

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

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

Returns:
the number of elements in this collection.


These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions