java.lang.Object
com.renomad.minum.utils.RingBuffer<T>
- All Implemented Interfaces:
Iterable<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the value at the slot pointed to by the "nextIndex".boolean
Returns true if the data in the "myList" parameter is found within the RingBuffer.boolean
containsAt
(List<T> myList, int index) Returns true if the data in the "myList" parameter is found within the RingBuffer at the index provided.int
getLimit()
iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RingBuffer
Build aRingBuffer
- Parameters:
limit
- the maximum size of the buffer
-
-
Method Details
-
add
-
getLimit
public int getLimit() -
contains
Returns true if the data in the "myList" parameter is found within the RingBuffer. -
containsAt
Returns true if the data in the "myList" parameter is found within the RingBuffer at the index provided. -
iterator
-
atNextIndex
Returns the value at the slot pointed to by the "nextIndex". Note that this will be null at first while the array starts to get filled.
-