类 FastList<T>
java.lang.Object
cn.xusc.trace.util.FastList<T>
- 所有已实现的接口:
Serializable,Iterable<T>,Collection<T>,List<T>,RandomAccess
Fast list without range checking.
中文说明: 为符合idea的Analyze Code,会将一些不必要的去掉。如果你想获取全的请到see进行查看
English explain: The Analyze Code is consistent with IDEA, will cut out some of the unnecessary. If you want to get all of them, please go to see
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidbooleanAdd an element to the tail of the FastList.booleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()Clear the FastList.clone()booleanbooleancontainsAll(Collection<?> c) voidget(int index) Get the element at the specified index.intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanThis remove method is most efficient when the element being removed is the last element.booleanremoveAll(Collection<?> c) booleanRemove the last element from the list.voidreplaceAll(UnaryOperator<T> operator) booleanretainAll(Collection<?> c) intsize()Get the current number of elements in the FastList.voidsort(Comparator<? super T> c) subList(int fromIndex, int toIndex) Object[]toArray()<E> E[]toArray(E[] a) 从类继承的方法 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.util.Collection
parallelStream, stream, toArray
-
构造器详细资料
-
FastList
Construct a FastList with a default size of 32.- 参数:
clazz- the Class stored in the collection
-
FastList
Construct a FastList with a specified size.- 参数:
clazz- the Class stored in the collectioncapacity- the initial size of the FastList
-
-
方法详细资料
-
add
Add an element to the tail of the FastList. -
get
Get the element at the specified index. -
removeLast
Remove the last element from the list. No bound check is performed, so if this method is called on an empty list and ArrayIndexOutOfBounds exception will be thrown.- 返回:
- the last element of the list
-
remove
This remove method is most efficient when the element being removed is the last element. Equality is identity based, not equals() based. Only the first matching element is removed. -
clear
public void clear()Clear the FastList. -
size
public int size()Get the current number of elements in the FastList. -
isEmpty
public boolean isEmpty() -
set
-
remove
-
contains
-
iterator
-
toArray
-
toArray
public <E> E[] toArray(E[] a) -
containsAll
- 指定者:
containsAll在接口中Collection<T>- 指定者:
containsAll在接口中List<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
add
-
indexOf
-
lastIndexOf
- 指定者:
lastIndexOf在接口中List<T>
-
listIterator
- 指定者:
listIterator在接口中List<T>
-
listIterator
- 指定者:
listIterator在接口中List<T>
-
subList
-
clone
-
forEach
-
spliterator
- 指定者:
spliterator在接口中Collection<T>- 指定者:
spliterator在接口中Iterable<T>- 指定者:
spliterator在接口中List<T>
-
removeIf
- 指定者:
removeIf在接口中Collection<T>
-
replaceAll
- 指定者:
replaceAll在接口中List<T>
-
sort
-