Companion

object Companion

Functions

Link copied to clipboard
fun emptyTuple(): AvailObject

Answer the empty tuple.

Link copied to clipboard
fun multiplierRaisedTo(anInteger: Int): Int

Compute AvailObject.multiplier raised to the specified power, truncated to an int.

Link copied to clipboard
fun staticConcatenateTuples(firstTuple: A_Tuple, secondTuple: A_Tuple): A_Tuple

Concatenate two A_Tuples, allowing either to be destroyed if it's mutable.

Link copied to clipboard
fun staticTupleAt(tuple: A_Tuple, index: Int): AvailObject

Answer the specified element of the tuple.

Link copied to clipboard
fun staticTupleAtPutting(    tuple: A_Tuple,     index: Int,     newValue: A_BasicObject): AvailObject

Replace the specified element of the tuple, destructively if it's mutable and of the right optimized element type. Answer the modified original or edited copy.

Link copied to clipboard
fun staticTupleSize(tuple: A_Tuple): Int

Answer the number of elements in this tuple.

Link copied to clipboard
fun toArray(tuple: A_Tuple): Array<AvailObject>

Construct an array from the specified A_Tuple. The elements are not made immutable.

Link copied to clipboard
fun <X : A_BasicObject?> toList(tuple: A_Tuple): MutableList<X>

Construct a Java List from the specified tuple. The elements are not made immutable.

Link copied to clipboard
fun tupleFromIntegerList(list: List<Int>): A_Tuple

Construct a new tuple of ints. Use the most compact representation that can still represent each supplied Integer.

Link copied to clipboard
fun tupleWithout(originalTuple: A_Tuple, elementToExclude: A_BasicObject): A_Tuple

Construct a new tuple of arbitrary Avail objects based on the given tuple, but with an occurrence of the specified element missing, if it was present at all. The elements may end up being shared between the original and the copy, so the client must ensure that either the elements are marked immutable, or one of the copies is not kept after the call. If the element is not found, then answer the original tuple.

Properties

Link copied to clipboard
Link copied to clipboard
val emptyTuple: AvailObject

The empty tuple.

Link copied to clipboard
const val preToggle: Int = 1910861990

The constant by which each element's hash should be XORed prior to combining them. This reduces the chance of systematic collisions due to using the same elements in different patterns of nested tuples.

Link copied to clipboard
val tupleAtMethod: CheckedMethod
Link copied to clipboard
val tupleAtPuttingMethod: CheckedMethod
Link copied to clipboard
val tupleSizeMethod: CheckedMethod