org.eclipse.jetty.util
类 ArrayQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.jetty.util.ArrayQueue<E>
- 类型参数:
E -
- 所有已实现的接口:
- Iterable<E>, Collection<E>, List<E>, Queue<E>
public class ArrayQueue<E>
- extends AbstractList<E>
- implements Queue<E>
Queue backed by circular array.
This partial Queue implementation (also with remove() for stack operation)
is backed by a growable circular array.
| 从接口 java.util.Collection 继承的方法 |
addAll, contains, containsAll, equals, hashCode, iterator, remove, removeAll, retainAll, toArray, toArray |
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY
- 另请参见:
- 常量字段值
DEFAULT_GROWTH
public static final int DEFAULT_GROWTH
- 另请参见:
- 常量字段值
_lock
protected final Object _lock
_growCapacity
protected final int _growCapacity
_elements
protected Object[] _elements
_nextE
protected int _nextE
_nextSlot
protected int _nextSlot
_size
protected int _size
ArrayQueue
public ArrayQueue()
ArrayQueue
public ArrayQueue(int capacity)
ArrayQueue
public ArrayQueue(int initCapacity,
int growBy)
ArrayQueue
public ArrayQueue(int initCapacity,
int growBy,
Object lock)
getCapacity
public int getCapacity()
add
public boolean add(E e)
- 指定者:
- 接口
Collection<E> 中的 add - 指定者:
- 接口
List<E> 中的 add - 指定者:
- 接口
Queue<E> 中的 add - 覆盖:
- 类
AbstractList<E> 中的 add
offer
public boolean offer(E e)
- 指定者:
- 接口
Queue<E> 中的 offer
addUnsafe
public void addUnsafe(E e)
- Add without synchronization or bounds checking
- 参数:
e - the element to add- 另请参见:
add(Object)
element
public E element()
- 指定者:
- 接口
Queue<E> 中的 element
peek
public E peek()
- 指定者:
- 接口
Queue<E> 中的 peek
poll
public E poll()
- 指定者:
- 接口
Queue<E> 中的 poll
remove
public E remove()
- 指定者:
- 接口
Queue<E> 中的 remove
clear
public void clear()
- 指定者:
- 接口
Collection<E> 中的 clear - 指定者:
- 接口
List<E> 中的 clear - 覆盖:
- 类
AbstractList<E> 中的 clear
isEmpty
public boolean isEmpty()
- 指定者:
- 接口
Collection<E> 中的 isEmpty - 指定者:
- 接口
List<E> 中的 isEmpty - 覆盖:
- 类
AbstractCollection<E> 中的 isEmpty
size
public int size()
- 指定者:
- 接口
Collection<E> 中的 size - 指定者:
- 接口
List<E> 中的 size - 指定者:
- 类
AbstractCollection<E> 中的 size
get
public E get(int index)
- 指定者:
- 接口
List<E> 中的 get - 指定者:
- 类
AbstractList<E> 中的 get
getUnsafe
public E getUnsafe(int index)
- Get without synchronization or bounds checking.
- 参数:
index - index of the element to return
- 返回:
- the element at the specified index
- 另请参见:
get(int)
remove
public E remove(int index)
- 指定者:
- 接口
List<E> 中的 remove - 覆盖:
- 类
AbstractList<E> 中的 remove
set
public E set(int index,
E element)
- 指定者:
- 接口
List<E> 中的 set - 覆盖:
- 类
AbstractList<E> 中的 set
add
public void add(int index,
E element)
- 指定者:
- 接口
List<E> 中的 add - 覆盖:
- 类
AbstractList<E> 中的 add
grow
protected boolean grow()
Copyright © 2013. All Rights Reserved.