ExpirationListImpl

@ApiStatus.Experimental
@ApiStatus.AvailableSince(value = "5.0.0")
class ExpirationListImpl<E> : ExpirationCollection<E>

The implementation of a list as an ExpirationCollection.

Parameters

E

The type of element in the collection.

Functions

Link copied to clipboard
open override fun add(element: E, expireIn: Duration, onExpire: ExpirationCallback<E>?)

Adds the given element to the collection.

Link copied to clipboard
open override fun addAll(expireIn: Duration, vararg elements: E, onExpire: ExpirationCallback<E>?)

Adds all the given elements to the collection.

Link copied to clipboard
open override fun addFirst(element: E, expireIn: Duration, onExpire: ExpirationCallback<E>?)

Adds the given element to the beginning of the collection.

Link copied to clipboard
open override fun addLast(element: E, expireIn: Duration, onExpire: ExpirationCallback<E>?)

Adds the given element to the end of the collection. This is the same as add.

Link copied to clipboard
open override fun clear(callCallbacks: Boolean)

Removes all the elements from the collection, possibly calling the callback on each element.

Link copied to clipboard
open operator override fun contains(element: E): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<E>): Boolean
Link copied to clipboard
open override fun first(): E?

Provides the element at the beginning of the collection.

Link copied to clipboard
open fun forEach(p0: Consumer<in E>)
Link copied to clipboard
open operator override fun get(index: Int): E?

Provides the element at the given index in the collection.

Link copied to clipboard
open override fun indexOf(element: E): Int

Provides the index of the given element in the collection.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): MutableIterator<E>
Link copied to clipboard
open override fun last(): E?

Provides the element at the end of the collection.

Link copied to clipboard
open fun parallelStream(): Stream<E>
Link copied to clipboard
open override fun remove(element: E): Boolean

Removes the give element from the collection if it is present.

Link copied to clipboard
open override fun removeAt(index: Int): E?

Removes the element at the given index from the collection if it is present.

Link copied to clipboard
open override fun removeFirst(): E?

Removes the element at the beginning of the collection if it is present.

Link copied to clipboard
open override fun removeLast(): E?

Removes the element at the end of the collection if it is present.

Link copied to clipboard
open override fun spliterator(): Spliterator<E>
Link copied to clipboard
open fun stream(): Stream<E>
Link copied to clipboard
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>

Properties

Link copied to clipboard
open override var size: Int = 0

Extensions

Link copied to clipboard
fun Collection<String>.contains(value: String, ignoreCase: Boolean = false): Boolean
Link copied to clipboard
fun <T : KCallable<*>> Collection<T>.findKCallable(name: String, ignoreCase: Boolean = false): Option<T>
Link copied to clipboard
@JvmName(name = "findKFunction")
inline fun <R> Collection<KFunction<*>>.findKFunction(name: String, ignoreCase: Boolean = false): Option<KFunction<R>>
@JvmName(name = "findKFunction0")
inline fun <R> Collection<() -> *>.findKFunction(name: String, ignoreCase: Boolean = false): Option<() -> R>
@JvmName(name = "findKFunction1")
inline fun <R> Collection<(*) -> *>.findKFunction(name: String, ignoreCase: Boolean = false): Option<(Any) -> R>
@JvmName(name = "findKFunction2")
inline fun <R> Collection<(*, *) -> *>.findKFunction(name: String, ignoreCase: Boolean = false): Option<(*, *) -> R>
Link copied to clipboard
@JvmName(name = "findKProperty0")
inline fun <R> Collection<KProperty0<*>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KProperty0<R>>
@JvmName(name = "findKProperty1")
inline fun <R> Collection<KProperty1<*, *>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KProperty1<Any, R>>
@JvmName(name = "findKProperty2")
inline fun <R> Collection<KProperty2<*, *, *>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KProperty2<*, *, R>>
@JvmName(name = "findKPropertyMutable0")
inline fun <R> Collection<KMutableProperty0<*>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KMutableProperty0<R>>
@JvmName(name = "findKPropertyMutable1")
inline fun <R> Collection<KMutableProperty1<*, *>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KMutableProperty1<*, R>>
@JvmName(name = "findKPropertyMutable2")
inline fun <R> Collection<KMutableProperty2<*, *, *>>.findKProperty(name: String, ignoreCase: Boolean = false): Option<KMutableProperty2<*, *, R>>
Link copied to clipboard
fun <T : Any> Collection<*>.getCast(index: Int): Validated<Throwable, T>
Link copied to clipboard
inline fun <T> Collection<T>?.ifNotEmpty(block: Collection<T>.() -> Unit): Collection<T>?

Invokes the given block if the receiver is not empty.

Link copied to clipboard
@JvmName(name = "msgAudienceCollection")
infix fun Collection<ComponentLike>.msg(audience: Audience)
Link copied to clipboard
fun Collection<String>.parse(): List<Component>