util
Interface Queue

All Known Implementing Classes:
BlockingQueue

public interface Queue

Author:
Stephan

Method Summary
 boolean add(java.lang.Object object)
          Appends the specified element to the end of this list (optional operation).
 boolean addAll(java.util.Collection coll)
          Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).
 void clear()
          Löscht alle Elemente dieser Queue.
 java.lang.Object get()
          Gibt das nächste Element der Queue zurück.
 boolean isEmpty()
          Returns true if this list contains no elements.
 int size()
          Returns the number of elements in this list.
 

Method Detail

size

public int size()
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:
the number of elements in this list.

isEmpty

public boolean isEmpty()
Returns true if this list contains no elements.

Returns:
true if this list contains no elements.

add

public boolean add(java.lang.Object object)
Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Returns:
true (as per the general contract of the Collection.add method).
Throws:
java.lang.UnsupportedOperationException - if the add method is not supported by this list.
java.lang.ClassCastException - if the class of the specified element prevents it from being added to this list.
java.lang.NullPointerException - if the specified element is null and this list does not support null elements.
java.lang.IllegalArgumentException - if some aspect of this element prevents it from being added to this list.

addAll

public boolean addAll(java.util.Collection coll)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Returns:
true if this list changed as a result of the call.
Throws:
java.lang.UnsupportedOperationException - if the addAll method is not supported by this list.
java.lang.ClassCastException - if the class of an element in the specified collection prevents it from being added to this list.
java.lang.NullPointerException - if the specified collection contains one or more null elements and this list does not support null elements, or if the specified collection is null.
java.lang.IllegalArgumentException - if some aspect of an element in the specified collection prevents it from being added to this list.
See Also:
add(Object)

clear

public void clear()
Löscht alle Elemente dieser Queue.


get

public java.lang.Object get()
Gibt das nächste Element der Queue zurück. Kann null zurückgeben, wenn kein Objekt mehr da ist oder auch blockieren