List

data class List(val value: MutableList<Value> = mutableListOf(), var metatable: Value.Table? = Companion.metatable) : Value, MutableList<Value>

A list.

Parameters

value

The backing list of the list.

metatable

The metatable of the list.

Constructors

Link copied to clipboard
constructor(value: MutableList<Value> = mutableListOf(), metatable: Value.Table? = Companion.metatable)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var metatable: Value.Table?
Link copied to clipboard
open override val size: Int
Link copied to clipboard

Functions

Link copied to clipboard
open override fun add(element: Value): Boolean
open override fun add(index: Int, element: Value)
Link copied to clipboard
open override fun addAll(elements: Collection<Value>): Boolean
open override fun addAll(index: Int, elements: Collection<Value>): Boolean
Link copied to clipboard
inline fun <T> Value.asObj(): T

If this is a Value.Native, returns the native object, otherwise throws an error.

Link copied to clipboard

Converts this value to a kotlin.Boolean, or throws an error if it cannot be converted.

Link copied to clipboard

Converts this value to a Value.Bytes, or throws an error if it cannot be converted.

Link copied to clipboard
open override fun clear()
Link copied to clipboard
open operator override fun contains(element: Value): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Value>): Boolean
Link copied to clipboard
inline fun <T : Value> Value.convertTo(): T

Converts this value to a T, or throws an error if it cannot be converted.

Link copied to clipboard

Converts this value to a Double, or throws an error if it cannot be converted.

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

Converts this value to a Int, or throws an error if it cannot be converted.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): MutableIterator<Value>
Link copied to clipboard
open override fun lastIndexOf(element: Value): Int
Link copied to clipboard
open override fun listIterator(): MutableListIterator<Value>
open override fun listIterator(index: Int): MutableListIterator<Value>
Link copied to clipboard

Converts this value to a Value.List, or throws an error if it cannot be converted.

Link copied to clipboard
fun Value.lookUp(key: Value): Value?

Look up a value in this value, possibly using the metatable.

Link copied to clipboard
open override fun lookUpDirect(key: Value): Value?

Look up a value in this value.

Link copied to clipboard
fun Value.lookUpHierarchy(vararg keys: String): Value?

Look up a successive sequence of strings in this value.

Link copied to clipboard
Link copied to clipboard

If this value is null, return Value.Null, otherwise return this value.

Link copied to clipboard
Link copied to clipboard
open override fun remove(element: Value): Boolean
Link copied to clipboard
open override fun removeAll(elements: Collection<Value>): Boolean
Link copied to clipboard
open override fun removeAt(index: Int): Value
Link copied to clipboard
open fun removeIf(p0: Predicate<in Value>): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun retainAll(elements: Collection<Value>): Boolean
Link copied to clipboard
open operator override fun set(index: Int, element: Value): Value
Link copied to clipboard
fun Value.set(key: Value, value: Value): Boolean

Sets a value in this value, possibly using the metatable.

Link copied to clipboard
open override fun setDirect(key: Value, value: Value): Boolean

Set a value in this value.

Link copied to clipboard
fun Value.setOrError(key: Value, value: Value)

Sets a value in this value, or throws an error if it cannot be set.

Link copied to clipboard
open fun sort(p0: Comparator<in Value>)
Link copied to clipboard
open override fun spliterator(): Spliterator<Value>
Link copied to clipboard
open fun stream(): Stream<Value>
Link copied to clipboard

Converts this value to a String, or throws an error if it cannot be converted.

Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): MutableList<Value>
Link copied to clipboard

Converts this value to a Value.Table, or throws an error if it cannot be converted.

Link copied to clipboard
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
Link copied to clipboard
open override fun toString(): String