ListExt<E> extension

on

Properties

size int

Available on List<E>, provided by the ListExt extension

no setter

Methods

copy() List<E>

Available on List<E>, provided by the ListExt extension

eachRight(EachFun<E> fun) → void

Available on List<E>, provided by the ListExt extension

findIndex(E value, CompareFun<E> compare) int

Available on List<E>, provided by the ListExt extension

找到数据位置,List 必须为已排序 没找到返回-1
findInsertIndex(E value, CompareFun<E> compare) int

Available on List<E>, provided by the ListExt extension

找到插入位置,调用该方法时List必须为已排序
firstMoreThanIndex<K>(K target, int compare(E a, K b), [int notIndex = -1]) int

Available on List<E>, provided by the ListExt extension

有序列表中查找第一个大于目标值的元素的位置(index) 如果没有返回notIndex
get(int index) → E

Available on List<E>, provided by the ListExt extension

getOrNull(int index) → E?

Available on List<E>, provided by the ListExt extension

lastLessThanIndex<K>(K target, int compare(E a, K b), [int notIndex = -1]) int

Available on List<E>, provided by the ListExt extension

查找最后一个小于目标值元素的位置(index) 如果没有返回 -1
listIterator([int index = 0]) ListIterator<E>

Available on List<E>, provided by the ListExt extension

pop() → E

Available on List<E>, provided by the ListExt extension

push(E value) → void

Available on List<E>, provided by the ListExt extension

reduplicate() → void

Available on List<E>, provided by the ListExt extension

removeAll(Iterable<E> elements) → void

Available on List<E>, provided by the ListExt extension

removeFirstOrNull() → E?

Available on List<E>, provided by the ListExt extension

removeLastOrNull() → E?

Available on List<E>, provided by the ListExt extension

reverseSelf() → void

Available on List<E>, provided by the ListExt extension

set(int index, E value) → void

Available on List<E>, provided by the ListExt extension

slice([int start = 0, int? end]) List<E>

Available on List<E>, provided by the ListExt extension

sortBy(CompareFun2<E> compare) → void

Available on List<E>, provided by the ListExt extension

sortWith(CComparator<E> comparator) → void

Available on List<E>, provided by the ListExt extension

toUnionList() List<E>

Available on List<E>, provided by the ListExt extension