org.ddogleg.struct
Class GrowQueue_I32
- java.lang.Object
-
- org.ddogleg.struct.GrowQueue_I32
-
public class GrowQueue_I32 extends java.lang.ObjectThis is a queue that is composed of integers. Elements are added and removed from the tail
-
-
Constructor Summary
Constructors Constructor and Description GrowQueue_I32()GrowQueue_I32(int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(int value)voidaddAll(GrowQueue_I32 queue)voidaddAll(int[] array, int startIndex, int endIndex)voidfill(int value)intget(int index)voidinsert(int index, int value)Inserts the value at the specified index and shifts all the other values down.intpop()voidpush(int val)voidremove(int index)voidremoveHead(int total)Removes the first 'total' elements from the queue.intremoveTail()voidreset()voidresize(int size)voidset(int index, int value)voidsetMaxSize(int size)voidsetTo(GrowQueue_I32 original)intsize()intunsafe_get(int index)
-
-
-
Constructor Detail
-
GrowQueue_I32
public GrowQueue_I32(int maxSize)
-
GrowQueue_I32
public GrowQueue_I32()
-
-
Method Detail
-
reset
public void reset()
-
addAll
public void addAll(GrowQueue_I32 queue)
-
addAll
public void addAll(int[] array, int startIndex, int endIndex)
-
add
public void add(int value)
-
push
public void push(int val)
-
get
public int get(int index)
-
unsafe_get
public int unsafe_get(int index)
-
set
public void set(int index, int value)
-
setTo
public void setTo(GrowQueue_I32 original)
-
remove
public void remove(int index)
-
insert
public void insert(int index, int value)Inserts the value at the specified index and shifts all the other values down.
-
removeHead
public void removeHead(int total)
Removes the first 'total' elements from the queue. Element 'total' will be the new start of the queue- Parameters:
total- Number of elements to remove from the head of the queue
-
removeTail
public int removeTail()
-
resize
public void resize(int size)
-
setMaxSize
public void setMaxSize(int size)
-
fill
public void fill(int value)
-
size
public int size()
-
pop
public int pop()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG