mondrian.util
Class ConcatenableList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<T>
          extended by mondrian.util.ConcatenableList<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

public class ConcatenableList<T>
extends java.util.AbstractList<T>

List backed by a collection of sub-lists.

Since:
december, 2007
Version:
$Id: //open/mondrian/src/main/mondrian/util/ConcatenableList.java#8 $
Author:
Luis F. Canals

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ConcatenableList()
          Creates an empty ConcatenableList.
 
Method Summary
 void add(int index, T t)
           
 boolean add(T t)
           
 boolean addAll(java.util.Collection<? extends T> collection)
           
 void clear()
           
 void consolidate()
          Performs a load of all elements into memory, removing sequential access advantages.
 T get(int index)
           
 int hashCode()
           
 boolean isEmpty()
           
 java.util.Iterator<T> iterator()
           
 T set(int index, T t)
           
 int size()
           
 java.lang.Object[] toArray()
           
<T2> T2[]
toArray(T2[] a)
           
 
Methods inherited from class java.util.AbstractList
addAll, equals, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
contains, containsAll, remove, removeAll, retainAll
 

Constructor Detail

ConcatenableList

public ConcatenableList()
Creates an empty ConcatenableList.

Method Detail

toArray

public <T2> T2[] toArray(T2[] a)
Specified by:
toArray in interface java.util.Collection<T>
Specified by:
toArray in interface java.util.List<T>
Overrides:
toArray in class java.util.AbstractCollection<T>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<T>
Specified by:
toArray in interface java.util.List<T>
Overrides:
toArray in class java.util.AbstractCollection<T>

consolidate

public void consolidate()
Performs a load of all elements into memory, removing sequential access advantages.


addAll

public boolean addAll(java.util.Collection<? extends T> collection)
Specified by:
addAll in interface java.util.Collection<T>
Specified by:
addAll in interface java.util.List<T>
Overrides:
addAll in class java.util.AbstractCollection<T>

get

public T get(int index)
Specified by:
get in interface java.util.List<T>
Specified by:
get in class java.util.AbstractList<T>

add

public boolean add(T t)
Specified by:
add in interface java.util.Collection<T>
Specified by:
add in interface java.util.List<T>
Overrides:
add in class java.util.AbstractList<T>

add

public void add(int index,
                T t)
Specified by:
add in interface java.util.List<T>
Overrides:
add in class java.util.AbstractList<T>

set

public T set(int index,
             T t)
Specified by:
set in interface java.util.List<T>
Overrides:
set in class java.util.AbstractList<T>

size

public int size()
Specified by:
size in interface java.util.Collection<T>
Specified by:
size in interface java.util.List<T>
Specified by:
size in class java.util.AbstractCollection<T>

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>
Specified by:
iterator in interface java.util.Collection<T>
Specified by:
iterator in interface java.util.List<T>
Overrides:
iterator in class java.util.AbstractList<T>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<T>
Specified by:
isEmpty in interface java.util.List<T>
Overrides:
isEmpty in class java.util.AbstractCollection<T>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<T>
Specified by:
clear in interface java.util.List<T>
Overrides:
clear in class java.util.AbstractList<T>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<T>
Specified by:
hashCode in interface java.util.List<T>
Overrides:
hashCode in class java.util.AbstractList<T>

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads