Groovy Documentation

org.codehaus.groovy.util
[Java] Class ManagedLinkedList

java.lang.Object
  org.codehaus.groovy.util.ManagedLinkedList

public class ManagedLinkedList
extends java.lang.Object

This class provides a very simple linked list of memory managed elements. This class does not support concurrent modifications nor will it check for them. This class is also not thread safe.

Authors:
Jochen Theodorou
Since:
1.6


Method Summary
java.lang.Object ManagedLinkedList(ReferenceBundle bundle)

void add(java.lang.Object value)

adds a value to the list

boolean isEmpty()

returns if the list is empty

java.util.Iterator iterator()

returns an iterator, which allows the removal of elements.

java.lang.Object[] toArray(java.lang.Object[] tArray)

Returns an array of non null elements from the source array.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

ManagedLinkedList

public java.lang.Object ManagedLinkedList(ReferenceBundle bundle)


add

public void add(java.lang.Object value)
adds a value to the list
Parameters:
value - the value


isEmpty

public boolean isEmpty()
returns if the list is empty
Returns:
true if the list is empty


iterator

public java.util.Iterator iterator()
returns an iterator, which allows the removal of elements. The next() method of the iterator may return null values. This is especially the case if the value was removed.
Returns:
the Iterator


toArray

public java.lang.Object[] toArray(java.lang.Object[] tArray)
Returns an array of non null elements from the source array.
Parameters:
tArray - the source array
Returns:
the array


 

Groovy Documentation