com.sun.appserv.management.util.misc
Class CircularList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
com.sun.appserv.management.util.misc.CircularList<T>
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, List<T>
public final class CircularList<T>
- extends AbstractList<T>
A circular list implementation
CircularList
public CircularList(Class<T> theClass,
int size)
setOverflowHandler
public void setOverflowHandler(CircularList.OverflowHandler handler)
getOverflowHandler
public CircularList.OverflowHandler getOverflowHandler()
size
public final int size()
- Specified by:
size
in interface Collection<T>
- Specified by:
size
in interface List<T>
- Specified by:
size
in class AbstractCollection<T>
capacity
public final int capacity()
clear
public final void clear()
- Specified by:
clear
in interface Collection<T>
- Specified by:
clear
in interface List<T>
- Overrides:
clear
in class AbstractList<T>
get
public final T get(int i)
- Specified by:
get
in interface List<T>
- Specified by:
get
in class AbstractList<T>
set
public final T set(int i,
T item)
- Specified by:
set
in interface List<T>
- Overrides:
set
in class AbstractList<T>
discardedObject
protected void discardedObject(T o)
add
public final boolean add(T item)
- Specified by:
add
in interface Collection<T>
- Specified by:
add
in interface List<T>
- Overrides:
add
in class AbstractList<T>
add
public final void add(int index,
T item)
- May be added to the end only.
- Specified by:
add
in interface List<T>
- Overrides:
add
in class AbstractList<T>
remove
public final T remove(int i)
- Specified by:
remove
in interface List<T>
- Overrides:
remove
in class AbstractList<T>
removeFirst
public final T removeFirst()
removeLast
public final T removeLast()
equals
public boolean equals(Object rhsIn)
- Specified by:
equals
in interface Collection<T>
- Specified by:
equals
in interface List<T>
- Overrides:
equals
in class AbstractList<T>
toString
public String toString()
- Overrides:
toString
in class AbstractCollection<T>
Submit a bug or feature Copyright 2006 Sun Microsystems, Inc. All rights reserved.