org.opennms.core.utils
Class LazyList<E>

java.lang.Object
  extended by org.opennms.core.utils.LazyList<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>

public class LazyList<E>
extends Object
implements List<E>


Nested Class Summary
static interface LazyList.Loader<E>
           
 
Constructor Summary
LazyList(LazyList.Loader<E> loader)
          Constructor for LazyList.
 
Method Summary
 boolean add(E o)
          add
 void add(int index, E element)
          add
 boolean addAll(Collection<? extends E> arg0)
          
 boolean addAll(int index, Collection<? extends E> c)
          
 void clear()
          clear
 boolean contains(Object o)
          
 boolean containsAll(Collection<?> arg0)
          
 E get(int arg0)
          
 int indexOf(Object o)
          
 boolean isEmpty()
          isEmpty
 boolean isLoaded()
          isLoaded
 Iterator<E> iterator()
          iterator
 int lastIndexOf(Object o)
          
 ListIterator<E> listIterator()
          listIterator
 ListIterator<E> listIterator(int index)
          
 E remove(int index)
          remove
 boolean remove(Object o)
          
 boolean removeAll(Collection<?> arg0)
          
 boolean retainAll(Collection<?> c)
          
 E set(int index, E element)
          set
 int size()
          size
 List<E> subList(int fromIndex, int toIndex)
          
 Object[] toArray()
          toArray
<T> T[]
toArray(T[] arg0)
          toArray
 String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

LazyList

public LazyList(LazyList.Loader<E> loader)

Constructor for LazyList.

Parameters:
loader - a LazyList.Loader object.
Method Detail

iterator

public Iterator<E> iterator()

iterator

Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface List<E>
Returns:
a Iterator object.

size

public int size()

size

Specified by:
size in interface Collection<E>
Specified by:
size in interface List<E>
Returns:
a int.

removeAll

public boolean removeAll(Collection<?> arg0)

Specified by:
removeAll in interface Collection<E>
Specified by:
removeAll in interface List<E>

addAll

public boolean addAll(Collection<? extends E> arg0)

Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>

clear

public void clear()

clear

Specified by:
clear in interface Collection<E>
Specified by:
clear in interface List<E>

contains

public boolean contains(Object o)

Specified by:
contains in interface Collection<E>
Specified by:
contains in interface List<E>

containsAll

public boolean containsAll(Collection<?> arg0)

Specified by:
containsAll in interface Collection<E>
Specified by:
containsAll in interface List<E>

isEmpty

public boolean isEmpty()

isEmpty

Specified by:
isEmpty in interface Collection<E>
Specified by:
isEmpty in interface List<E>
Returns:
a boolean.

remove

public boolean remove(Object o)

Specified by:
remove in interface Collection<E>
Specified by:
remove in interface List<E>

toArray

public Object[] toArray()

toArray

Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Returns:
an array of Object objects.

toArray

public <T> T[] toArray(T[] arg0)

toArray

Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Type Parameters:
T - a T object.
Parameters:
arg0 - an array of T objects.
Returns:
an array of T objects.

toString

public String toString()

toString

Overrides:
toString in class Object
Returns:
a String object.

isLoaded

public boolean isLoaded()

isLoaded

Returns:
a boolean.

get

public E get(int arg0)

Specified by:
get in interface List<E>

add

public boolean add(E o)

add

Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Parameters:
o - a E object.
Returns:
a boolean.

add

public void add(int index,
                E element)

add

Specified by:
add in interface List<E>
Parameters:
index - a int.
element - a E object.

addAll

public boolean addAll(int index,
                      Collection<? extends E> c)

Specified by:
addAll in interface List<E>

indexOf

public int indexOf(Object o)

Specified by:
indexOf in interface List<E>

lastIndexOf

public int lastIndexOf(Object o)

Specified by:
lastIndexOf in interface List<E>

listIterator

public ListIterator<E> listIterator()

listIterator

Specified by:
listIterator in interface List<E>
Returns:
a ListIterator object.

listIterator

public ListIterator<E> listIterator(int index)

Specified by:
listIterator in interface List<E>

remove

public E remove(int index)

remove

Specified by:
remove in interface List<E>
Parameters:
index - a int.
Returns:
a E object.

retainAll

public boolean retainAll(Collection<?> c)

Specified by:
retainAll in interface Collection<E>
Specified by:
retainAll in interface List<E>

set

public E set(int index,
             E element)

set

Specified by:
set in interface List<E>
Parameters:
index - a int.
element - a E object.
Returns:
a E object.

subList

public List<E> subList(int fromIndex,
                       int toIndex)

Specified by:
subList in interface List<E>


Copyright © 2011. All Rights Reserved.