public class FixedQueue<E> extends Object
Constructor and Description |
---|
FixedQueue(int limit) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Collection<E> datas) |
void |
addIndex(int index,
E object) |
List<E> |
asList() |
void |
clearAll()
清空队列
|
FixedQueue<E> |
clone() |
E |
get(int position) |
E |
getFirst() |
E |
getLast() |
int |
getLimit() |
boolean |
isEmpty() |
void |
offer(E e)
入列:当队列大小已满时,把队头的元素poll掉,将数据插入队尾
|
E |
removeFirst() |
boolean |
removeFirst(E e) |
E |
removeIndex(int index) |
E |
removeLast() |
void |
set(E e,
int position) |
int |
size() |
List<E> |
subList(int from,
int to) |
public void offer(E e)
e
- 入队的元素public void set(E e, int position)
public E get(int position)
public void clearAll()
public E getLast()
public E getFirst()
public int getLimit()
public int size()
public boolean isEmpty()
public E removeLast()
public E removeFirst()
public boolean removeFirst(E e)
public E removeIndex(int index)
public void addIndex(int index, E object)
public FixedQueue<E> clone()
public void addAll(Collection<E> datas)
Copyright © 2020 Voovan. All rights reserved.