Groovy 1.7.0

org.codehaus.groovy.util
Class ManagedLinkedList

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

class ManagedLinkedList
extends 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.

author:
Jochen Theodorou
since:
1.6


Nested Class Summary
class ManagedLinkedList.Element

class ManagedLinkedList.Iter

 
Constructor Summary
ManagedLinkedList()

 
Method Summary
def ManagedLinkedList(ReferenceBundle bundle)

void add(T value)

adds a value to the list

boolean isEmpty()

returns if the list is empty

Iterator iterator()

returns an iterator, which allows the removal of elements.

T[] toArray(T[] tArray)

this will return an array of non null elements of this list

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Constructor Detail

ManagedLinkedList

ManagedLinkedList()


 
Method Detail

ManagedLinkedList

public def ManagedLinkedList(ReferenceBundle bundle)


add

public void add(T value)
adds a value to the list
param:
value the value


isEmpty

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


iterator

public 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
return:
the Iterator


toArray

public T[] toArray(T[] tArray)
this will return an array of non null elements of this list
return:
the array


 

Copyright © 2003-2009 The Codehaus. All rights reserved.