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
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.
-
-
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(Collection<out T> c)booleanaddAll(int index, Collection<out T> c)-
Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize -
Methods inherited from class java.util.List
containsAll, copyOf, of -
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.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)
-
-
-
-