E - 列表项类型public class FreezedList<E> extends AbstractList<E> implements RandomAccess, Serializable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
FreezedList.StringList
排序的字串列表
|
| 限定符和类型 | 字段和说明 |
|---|---|
static Comparator<String> |
_compString
字串顺序排序比较器(但空项或空字串排到最后)
|
static Object[] |
_nilArray |
protected E[] |
m_Elements
列表项
|
protected int |
m_Offset
开始位置(下标)
|
protected int |
m_Size
项数
|
modCount| 限定符 | 构造器和说明 |
|---|---|
|
FreezedList(Collection<? extends E> elements) |
|
FreezedList(Collection<? extends E> elements,
boolean trimNull) |
protected |
FreezedList(E[] elements) |
|
FreezedList(E[] elements,
int size,
boolean attach) |
|
FreezedList(E[] elements,
int offset,
int size,
boolean isAttach) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> List<E> |
addToFreezed(List<? extends E> list,
int index,
E value)
插入列表项且封装为只读
|
static <E> List<E> |
freezed(Collection<E> coll)
封装为只读的列表
|
static <E> List<E> |
freezed(Collection<E> coll,
Comparator<? super E> sort)
封装为只读的列表
|
static <E> List<E> |
freezed(E[] elements,
Comparator<? super E> sort)
封装为只读的列表
|
static <E> List<E> |
freezed(List<E> list)
封装为只读的列表
|
static <E> List<E> |
freezed(List<E> list,
boolean trimNull)
封装为只读的列表
|
static List<String> |
freezedStrings(List<String> list)
封装为只读排序(且去除空项)的字串列表
|
E |
get(int index) |
int |
hashCode() |
static <E> List<E> |
removeToFreezed(List<? extends E> list,
int index,
int count)
删除列表项且封装为只读
|
static <E> List<E> |
replaceToFreezed(List<? extends E> list,
int index,
E value)
替换列表项且封装为只读
|
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
add, add, addAll, clear, equals, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, setaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toStringprotected final E[] m_Elements
protected final int m_Size
protected final int m_Offset
public static final Object[] _nilArray
public static final Comparator<String> _compString
public FreezedList(E[] elements, int size, boolean attach)
public FreezedList(E[] elements, int offset, int size, boolean isAttach)
protected FreezedList(E[] elements)
public FreezedList(Collection<? extends E> elements)
public FreezedList(Collection<? extends E> elements, boolean trimNull)
public static <E> List<E> freezed(List<E> list)
E - 列表项类型list - 要封装的列表public static <E> List<E> freezed(List<E> list, boolean trimNull)
E - 列表项类型list - 要封装的列表trimNull - 是否去除空项public static <E> List<E> replaceToFreezed(List<? extends E> list, int index, E value)
E - 列表项类型list - 要替换且封装的列表index - 替换项的位置value - 新的项值public static <E> List<E> removeToFreezed(List<? extends E> list, int index, int count)
E - 列表项类型list - 要删除且封装的列表index - 删除的项位置count - 删除的项数public static <E> List<E> addToFreezed(List<? extends E> list, int index, E value)
E - 列表项类型list - 要插入且封装的列表index - 插入项的位置value - 要插入的项public static <E> List<E> freezed(Collection<E> coll)
E - 列表项类型coll - 要封装的列表public static <E> List<E> freezed(Collection<E> coll, Comparator<? super E> sort)
E - 列表项类型coll - 要封装的列表sort - 若指定比较器则排序后封装public static <E> List<E> freezed(E[] elements, Comparator<? super E> sort)
E - 列表项类型elements - 要封装的数组sort - 若指定比较器则排序后封装public static List<String> freezedStrings(List<String> list)
list - 要封装的字串列表public int size()
size 在接口中 Collection<E>size 在接口中 List<E>size 在类中 AbstractCollection<E>public int hashCode()
hashCode 在接口中 Collection<E>hashCode 在接口中 List<E>hashCode 在类中 AbstractList<E>public Object[] toArray()
toArray 在接口中 Collection<E>toArray 在接口中 List<E>toArray 在类中 AbstractCollection<E>Copyright © 2020. All rights reserved.