org.ujmp.core.collections
Class RingBufferList<A>

java.lang.Object
  extended by org.ujmp.core.collections.RingBufferList<A>
All Implemented Interfaces:
Serializable, Iterable<A>, Collection<A>, List<A>

public class RingBufferList<A>
extends Object
implements List<A>, Serializable

See Also:
Serialized Form

Constructor Summary
RingBufferList()
           
RingBufferList(int maximumSize)
           
 
Method Summary
 boolean add(A a)
           
 void add(int index, A element)
           
 boolean addAll(Collection<? extends A> c)
           
 boolean addAll(int index, Collection<? extends A> c)
           
 void addFirst(A a)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 A get(int index)
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<A> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<A> listIterator()
           
 ListIterator<A> listIterator(int index)
           
 int maxSize()
           
 A remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 A set(int index, A a)
           
 int size()
           
 List<A> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String 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

RingBufferList

public RingBufferList()

RingBufferList

public RingBufferList(int maximumSize)
Method Detail

maxSize

public int maxSize()

add

public boolean add(A a)
Specified by:
add in interface Collection<A>
Specified by:
add in interface List<A>

size

public int size()
Specified by:
size in interface Collection<A>
Specified by:
size in interface List<A>

toString

public String toString()
Overrides:
toString in class Object

addFirst

public void addFirst(A a)

get

public A get(int index)
Specified by:
get in interface List<A>

set

public A set(int index,
             A a)
Specified by:
set in interface List<A>

clear

public void clear()
Specified by:
clear in interface Collection<A>
Specified by:
clear in interface List<A>

add

public void add(int index,
                A element)
Specified by:
add in interface List<A>

addAll

public boolean addAll(Collection<? extends A> c)
Specified by:
addAll in interface Collection<A>
Specified by:
addAll in interface List<A>

addAll

public boolean addAll(int index,
                      Collection<? extends A> c)
Specified by:
addAll in interface List<A>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<A>
Specified by:
contains in interface List<A>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<A>
Specified by:
containsAll in interface List<A>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<A>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<A>
Specified by:
isEmpty in interface List<A>

iterator

public Iterator<A> iterator()
Specified by:
iterator in interface Iterable<A>
Specified by:
iterator in interface Collection<A>
Specified by:
iterator in interface List<A>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<A>

listIterator

public ListIterator<A> listIterator()
Specified by:
listIterator in interface List<A>

listIterator

public ListIterator<A> listIterator(int index)
Specified by:
listIterator in interface List<A>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<A>
Specified by:
remove in interface List<A>

remove

public A remove(int index)
Specified by:
remove in interface List<A>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<A>
Specified by:
removeAll in interface List<A>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<A>
Specified by:
retainAll in interface List<A>

subList

public List<A> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<A>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<A>
Specified by:
toArray in interface List<A>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<A>
Specified by:
toArray in interface List<A>


Copyright © 2010. All Rights Reserved.