Class RingBuffer<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- java.util.concurrent.ConcurrentLinkedQueue<T>
-
- io.joshworks.snappy.extensions.dashboard.RingBuffer<T>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.Queue<T>
public class RingBuffer<T> extends java.util.concurrent.ConcurrentLinkedQueue<T>Created by Josh Gontijo on 5/14/17.- See Also:
- Serialized Form
-
-
Method Summary
Modifier and Type Method Description voidclear()booleancontainsAll(java.util.Collection<?> c)booleanoffer(T t)static <T> RingBuffer<T>ofSize(int size)Tpeek()Tpoll()Tremove()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)-
Methods inherited from class java.util.concurrent.ConcurrentLinkedQueue
add, addAll, contains, forEach, isEmpty, iterator, removeIf, size, spliterator, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
ofSize
public static <T> RingBuffer<T> ofSize(int size)
-
offer
public boolean offer(T t)
-
poll
public T poll()
-
peek
public T peek()
-
clear
public void clear()
-
remove
public boolean remove(java.lang.Object o)
-
remove
public T remove()
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
-