Companion

object Companion

Properties

Link copied to clipboard

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

Functions

Link copied to clipboard

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 StringBuilder.quoteStringOn(string: A_String, map: MutableMap<Int, Int>? = null)

Quote the given string, making it presentable as an Avail string literal. If a mutable map is provided, populate it with the correspondence between each one-based position in the input string and its zero-based position in the receiver, a StringBuilder. Include a final entry for just past the end of the string to the close quote of the builder.

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

Answer the specified element of the tuple.

Link copied to clipboard

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

Answer the number of elements in this tuple.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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.