Package org.epics.util.array
Class BufferInteger
- java.lang.Object
-
- org.epics.util.array.ListInteger
-
- org.epics.util.array.BufferInteger
-
- All Implemented Interfaces:
CollectionInteger
,CollectionNumber
,ListNumber
public class BufferInteger extends ListInteger
An implementation of a list on top of buffer. The buffer will start at the initial capacity (default 10) and will continue to grow.- Author:
- carcassi
-
-
Constructor Summary
Constructors Constructor Description BufferInteger()
Creates a new buffer.BufferInteger(int initialCapacity)
Creates a new buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInt(int value)
Adds a new value.void
clear()
Removes all values from the buffer.int
getCurrentCapacity()
The maximum capacity for this buffer.int
getInt(int index)
Returns the element at the specified position in this list casted to an int.int
size()
Returns the number of elements in the collection.-
Methods inherited from class org.epics.util.array.ListInteger
equals, getByte, getDouble, getFloat, getLong, getShort, hashCode, iterator, setAll, setByte, setDouble, setFloat, setInt, setLong, setShort, subList, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.epics.util.array.CollectionNumber
toArray
-
-
-
-
Method Detail
-
getInt
public int getInt(int index)
Returns the element at the specified position in this list casted to an int.- Parameters:
index
- position of the element to return- Returns:
- the element at the specified position in this list
-
size
public int size()
Returns the number of elements in the collection.- Returns:
- the number of elements in the collection
-
addInt
public void addInt(int value)
Adds a new value.- Parameters:
value
- new value
-
clear
public void clear()
Removes all values from the buffer.
-
getCurrentCapacity
public int getCurrentCapacity()
The maximum capacity for this buffer.- Returns:
- maximum capacity
-
-