Package ai.nexconn.chatui.widget.cache
Class MessageList
-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable,java.util.Collection,java.util.List,java.util.RandomAccess,java.util.SequencedCollection
public class MessageList<T> extends ArrayList<E>
A list specialized for message display. When the max capacity is reached, inserting at the bottom discards top items, while inserting at the top retains bottom items regardless of the max.
-
-
Field Summary
Fields Modifier and Type Field Description protected transient intmodCount
-
Constructor Summary
Constructors Constructor Description MessageList(int maxCount, int initialCapacity)MessageList(int maxCount)MessageList(int maxCount, Collection<out T> c)
-
Method Summary
Modifier and Type Method Description booleanadd(T t)voidadd(int index, T element)booleanaddAll(@NonNull() Collection<out T> c)booleanaddAll(int index, @NonNull() Collection<out T> c)-
Methods inherited from class java.util.ArrayList
addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize -
Methods inherited from class java.util.List
containsAll, copyOf, of, reversed -
Methods inherited from class java.util.AbstractCollection
toString -
Methods inherited from class java.util.Collection
parallelStream, stream -
Methods inherited from class java.lang.Iterable
iterator, spliterator -
Methods inherited from class java.util.SequencedCollection
reversed -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MessageList
MessageList(int maxCount, int initialCapacity)
-
MessageList
MessageList(int maxCount)
-
MessageList
MessageList(int maxCount, Collection<out T> c)
-
-
Method Detail
-
addAll
boolean addAll(@NonNull() Collection<out T> c)
-
addAll
boolean addAll(int index, @NonNull() Collection<out T> c)
-
-
-
-