public class LongValueList extends CircularValueList implements java.util.List<java.lang.Long>
CircularValueList.Statistics
Modifier and Type | Field and Description |
---|---|
long |
maxValue |
long |
minValue |
long |
rangeMinMax
the distance between the min and max value
|
long[] |
values
The raw values
|
EOR, head, maintainMinMax, maintainSum, maxIdx, minIdx, num, sizeMax, tail
Constructor and Description |
---|
LongValueList(int cacheSize,
boolean maintainMinMax)
Constructs a new PlotValueList with the given preallocated entries.
|
Modifier and Type | Method and Description |
---|---|
int |
add(float newValue) |
void |
add(int location,
java.lang.Long object) |
int |
add(long newValue)
Adds a new entry to the ring, possibly overwriting the eldest entry.
|
boolean |
add(java.lang.Long object) |
boolean |
addAll(java.util.Collection<? extends java.lang.Long> arg0) |
boolean |
addAll(int arg0,
java.util.Collection<? extends java.lang.Long> arg1) |
void |
clear() |
boolean |
contains(java.lang.Object object) |
boolean |
containsAll(java.util.Collection<?> arg0) |
void |
copy(java.util.ArrayList<java.lang.Long> sourceList)
Copies the contents of sourceList into this ring buffer.
|
void |
findMax()
Iterates over all valid elements and fills the max value.
|
void |
findMin()
Iterates over all valid elements and fills the min value.
|
void |
findMinMax()
Iterates over all valid elements and fills the min & max value.
|
java.lang.Long |
get(int location) |
long |
getHeadValue()
Returns the value at the current head position.
|
long |
getIndirect(int rIdx)
Returns the value at position rIdx.
|
int |
indexOf(java.lang.Object object) |
java.util.Iterator<java.lang.Long> |
iterator() |
int |
lastIndexOf(java.lang.Object object) |
java.util.ListIterator<java.lang.Long> |
listIterator() |
java.util.ListIterator<java.lang.Long> |
listIterator(int location) |
java.lang.Long |
remove(int location) |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> arg0) |
boolean |
retainAll(java.util.Collection<?> arg0) |
java.lang.Long |
set(int location,
java.lang.Long object) |
java.util.List<java.lang.Long> |
subList(int start,
int end) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
isEmpty, normIdx, size, tailDistance
public long[] values
public long minValue
public long maxValue
public long rangeMinMax
public LongValueList(int cacheSize, boolean maintainMinMax)
cacheSize
- Number of preallocated entries.maintainMinMax
- Whether to maintain the min and max values.public int add(long newValue)
add
in class CircularValueList
newValue
- The value to add to the list.public void clear()
clear
in interface java.util.Collection<java.lang.Long>
clear
in interface java.util.List<java.lang.Long>
clear
in class CircularValueList
public void copy(java.util.ArrayList<java.lang.Long> sourceList)
sourceList
- public void findMax()
findMax
in class CircularValueList
public void findMin()
findMin
in class CircularValueList
public void findMinMax()
findMinMax
in class CircularValueList
public long getHeadValue()
public long getIndirect(int rIdx)
rIdx
- negative or positive index in the ringpublic void add(int location, java.lang.Long object)
add
in interface java.util.List<java.lang.Long>
public boolean addAll(java.util.Collection<? extends java.lang.Long> arg0)
addAll
in interface java.util.Collection<java.lang.Long>
addAll
in interface java.util.List<java.lang.Long>
public boolean addAll(int arg0, java.util.Collection<? extends java.lang.Long> arg1)
addAll
in interface java.util.List<java.lang.Long>
public boolean contains(java.lang.Object object)
contains
in interface java.util.Collection<java.lang.Long>
contains
in interface java.util.List<java.lang.Long>
public boolean containsAll(java.util.Collection<?> arg0)
containsAll
in interface java.util.Collection<java.lang.Long>
containsAll
in interface java.util.List<java.lang.Long>
public java.lang.Long get(int location)
get
in interface java.util.List<java.lang.Long>
public int indexOf(java.lang.Object object)
indexOf
in interface java.util.List<java.lang.Long>
public java.util.Iterator<java.lang.Long> iterator()
iterator
in interface java.lang.Iterable<java.lang.Long>
iterator
in interface java.util.Collection<java.lang.Long>
iterator
in interface java.util.List<java.lang.Long>
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List<java.lang.Long>
public java.util.ListIterator<java.lang.Long> listIterator()
listIterator
in interface java.util.List<java.lang.Long>
public java.util.ListIterator<java.lang.Long> listIterator(int location)
listIterator
in interface java.util.List<java.lang.Long>
public java.lang.Long remove(int location)
remove
in interface java.util.List<java.lang.Long>
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<java.lang.Long>
remove
in interface java.util.List<java.lang.Long>
public boolean removeAll(java.util.Collection<?> arg0)
removeAll
in interface java.util.Collection<java.lang.Long>
removeAll
in interface java.util.List<java.lang.Long>
public boolean retainAll(java.util.Collection<?> arg0)
retainAll
in interface java.util.Collection<java.lang.Long>
retainAll
in interface java.util.List<java.lang.Long>
public java.lang.Long set(int location, java.lang.Long object)
set
in interface java.util.List<java.lang.Long>
public java.util.List<java.lang.Long> subList(int start, int end)
subList
in interface java.util.List<java.lang.Long>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Long>
toArray
in interface java.util.List<java.lang.Long>
public <T> T[] toArray(T[] array)
toArray
in interface java.util.Collection<java.lang.Long>
toArray
in interface java.util.List<java.lang.Long>
public boolean add(java.lang.Long object)
add
in interface java.util.Collection<java.lang.Long>
add
in interface java.util.List<java.lang.Long>
public int add(float newValue)
add
in class CircularValueList