Package org.ujmp.core.collections
Class RingBufferList<A>
- java.lang.Object
-
- org.ujmp.core.collections.RingBufferList<A>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<A>
,java.util.Collection<A>
,java.util.List<A>
public class RingBufferList<A> extends java.lang.Object implements java.util.List<A>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
RingBufferList.RingBufferIterator
-
Field Summary
Fields Modifier and Type Field Description private int
end
private static long
serialVersionUID
private int
start
private java.lang.Object[]
values
-
Constructor Summary
Constructors Constructor Description RingBufferList()
RingBufferList(int maximumSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, A element)
boolean
add(A a)
boolean
addAll(int index, java.util.Collection<? extends A> c)
boolean
addAll(java.util.Collection<? extends A> c)
void
addFirst(A a)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
A
get(int index)
int
indexOf(java.lang.Object o)
boolean
isEmpty()
java.util.Iterator<A>
iterator()
int
lastIndexOf(java.lang.Object o)
java.util.ListIterator<A>
listIterator()
java.util.ListIterator<A>
listIterator(int index)
int
maxSize()
A
remove(int index)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
A
set(int index, A a)
int
size()
java.util.List<A>
subList(int fromIndex, int toIndex)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
start
private int start
-
end
private int end
-
values
private java.lang.Object[] values
-
-
Method Detail
-
maxSize
public int maxSize()
-
add
public boolean add(A a)
-
size
public int size()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addFirst
public void addFirst(A a)
-
clear
public void clear()
-
addAll
public boolean addAll(java.util.Collection<? extends A> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends A> c)
- Specified by:
addAll
in interfacejava.util.List<A>
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf
in interfacejava.util.List<A>
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<A> iterator()
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf
in interfacejava.util.List<A>
-
listIterator
public java.util.ListIterator<A> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<A>
-
listIterator
public java.util.ListIterator<A> listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List<A>
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
subList
public java.util.List<A> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<A>
-
toArray
public java.lang.Object[] toArray()
-
-