Companion

object Companion

Functions

Link copied to clipboard
fun A_Tuple.appendCanDestroy(newElement: A_BasicObject, canDestroy: Boolean): A_Tuple

Create a tuple with the same elements as the receiver, but with the specified newElement appended.

Link copied to clipboard
fun A_Tuple.childAt(childIndex: Int): A_Tuple

Answer the Nth child of this tree tuple.

Link copied to clipboard
fun A_Tuple.compareFromToWithAnyTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithByteArrayTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aByteArrayTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte array tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithByteBufferTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aByteBufferTuple: A_Tuple,     startIndex2: Int): Boolean

Test whether the subtuple of the receiver from startIndex1 to endIndex1 equals the subtuple of the byte buffer tuple of the same length starting at startIndex2.

Link copied to clipboard
fun A_Tuple.compareFromToWithByteStringStartingAt(    startIndex1: Int,     endIndex1: Int,     aByteString: A_String,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte string. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithByteTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aByteTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithIntegerIntervalTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     anIntegerIntervalTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given integer interval tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithIntTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     anIntTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given int tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithNybbleTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aNybbleTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given nybble tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithObjectTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     anObjectTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given object tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithRepeatedElementTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aRepeatedElementTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given repeated element tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithSmallIntegerIntervalTupleStartingAt(    startIndex1: Int,     endIndex1: Int,     aSmallIntegerIntervalTuple: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given small integer interval tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithStartingAt(    startIndex1: Int,     endIndex1: Int,     anotherObject: A_Tuple,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of another object. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithTwoByteStringStartingAt(    startIndex1: Int,     endIndex1: Int,     aTwoByteString: A_String,     startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given two-byte string. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
operator fun A_Tuple.component1(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component2(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component3(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component4(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component5(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component6(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component7(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component8(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
operator fun A_Tuple.component9(): AvailObject

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
fun A_Tuple.computeHashFromTo(start: Int, end: Int): Int

Compute the hash of the specified subrange of this tuple.

Link copied to clipboard
fun <T : A_Tuple> concatenate(    firstTuple: T,     secondTuple: T,     canDestroy: Boolean): T

Concatenate two A_Tuples or A_Strings, relying on type deduction to decide which will be produced based on the arguments.

Link copied to clipboard
fun A_Tuple.concatenateTuplesCanDestroy(canDestroy: Boolean): A_Tuple

Given a tuple of tuples, concatenate all the inner tuples to construct one new tuple. May destroy the original tuple of tuples if so indicated.

Link copied to clipboard
fun A_Tuple.concatenateWith(otherTuple: A_Tuple, canDestroy: Boolean): A_Tuple

Concatenate the receiver and the argument otherTuple to form a new tuple. Assume that the two input tuples may be destroyed or recycled if they're mutable.

Link copied to clipboard
fun A_Tuple.copyAsMutableIntTuple(): A_Tuple

Make a mutable copy of the tuple but in a form that accepts Ints.

Link copied to clipboard
fun A_Tuple.copyAsMutableLongTuple(): A_Tuple

Make a mutable copy of the tuple but in a form that accepts Longs.

Link copied to clipboard
fun A_Tuple.copyAsMutableObjectTuple(): A_Tuple

Make a mutable copy of the tuple but in a form that accepts any objects.

Link copied to clipboard
fun A_Tuple.copyTupleFromToCanDestroy(    start: Int,     end: Int,     canDestroy: Boolean): A_Tuple

Make a tuple that only contains the given range of elements of the given tuple. Subclasses have different strategies for how to accomplish this efficiently.

Link copied to clipboard
fun A_Tuple.extractNybbleFromTupleAt(index: Int): Byte

Extract the specified element from the tuple. The element must be an integer in the range 0..15, and is returned as a Java byte.

Link copied to clipboard
fun A_Tuple.firstIndexOf(    value: A_BasicObject,     startIndex: Int,     endIndex: Int): Int

Search for a particular value in the tuple, starting at the given index and working forward.

Link copied to clipboard
fun A_Tuple.hashFromTo(startIndex: Int, endIndex: Int): Int

Calculate the hash of the subtuple spanning the two indices.

Link copied to clipboard
fun A_Tuple.isBetterRepresentationThan(anotherObject: A_BasicObject): Boolean

Given two objects that are known to be equal, is the first one in a better form (more compact, more efficient, older generation) than the second one?

Link copied to clipboard
fun A_Tuple.lastIndexOf(    value: A_BasicObject,     startIndex: Int,     endIndex: Int): Int

Search for a particular value in the tuple, starting at the given one-based index and working backward.

Link copied to clipboard
fun A_Tuple.parallelStream(): Stream<AvailObject>

Returns a possibly parallel Stream with this tuple as its source. It is allowable for this method to return a sequential stream.

Link copied to clipboard
fun A_Tuple.rawByteForCharacterAt(index: Int): Short

The receiver is a byte string; extract the code point of the character at the given index as an unsigned byte.

Link copied to clipboard
fun A_Tuple.replaceFirstChild(newFirst: A_Tuple): A_Tuple

Replace the first child of this tree tuple. Make a copy to modify if the receiver is immutable. Answer the modified original or copy.

Link copied to clipboard
fun A_Tuple.stream(): Stream<AvailObject>

Returns a sequential Stream with this tuple as its source.

Link copied to clipboard
fun A_Tuple.transferIntoByteBuffer(    startIndex: Int,     endIndex: Int,     outputByteBuffer: ByteBuffer)

Transfer the specified subrange of this tuple of bytes into the provided ByteBuffer. There should be sufficient room to write the bytes.

Link copied to clipboard
fun A_Tuple.tupleAt(index: Int): AvailObject

Answer the specified element of the tuple.

Link copied to clipboard
fun A_Tuple.tupleAtPuttingCanDestroy(    index: Int,     newValueObject: A_BasicObject,     canDestroy: Boolean): A_Tuple

Answer a new tuple like the receiver but with a single element replaced at the specified index. If the receiver is mutable and canDestroy is true, then the receiver may be modified or destroyed.

Link copied to clipboard
fun A_Tuple.tupleCodePointAt(index: Int): Int

Answer the code point of the character at the given one-based index in this tuple. The tuple doesn't have to be a string, but the requested element must be a character.

Link copied to clipboard
fun A_Tuple.tupleElementsInRangeAreInstancesOf(    startIndex: Int,     endIndex: Int,     type: A_Type): Boolean

Determine whether the specified elements of this tuple each conform to the specified type.

Link copied to clipboard
fun A_Tuple.tupleIntAt(index: Int): Int

Answer the specified element of the tuple. It must be an integer in the range [-2^31..2^31), and is returned as a Java int.

Link copied to clipboard
fun A_Tuple.tupleLongAt(index: Int): Long

Answer the specified element of the tuple. It must be a Long in the range [-2^63..2^63), and is returned as a Kotlin Long.

Link copied to clipboard
fun A_Tuple.tupleReverse(): A_Tuple

Answer a tuple that has the receiver's elements but in reverse order.

Properties

Link copied to clipboard
val A_Tuple.asSet: A_Set

Construct a Java set from the receiver, a tuple.

Link copied to clipboard
val A_Tuple.bitsPerEntry: Int

Answer the approximate memory cost in bits per element of this tuple. This is used to decide the direction of indirections after determining two objects are equal.

Link copied to clipboard
val A_Tuple.byteArray: ByteArray

Extract the backing byte[] from this tuple. Only applicable if the tuple's descriptor answers true to A_Tuple.isByteArrayTuple.

Link copied to clipboard
val A_Tuple.byteBuffer: ByteBuffer

The receiver must be a byte buffer tuple; answer its backing ByteBuffer.

Link copied to clipboard
val A_Tuple.childCount: Int

Answer the number of children this tree tuple contains.

Link copied to clipboard
val A_Tuple.treeTupleLevel: Int

Return the height of this tree tuple. Flat tuples and subranges have height 0, and tree tuples have heights from 1 to 10. All of a tree tuple's children have a height of one less than the parent tree tuple.

Link copied to clipboard
val A_Tuple.tupleSize: Int

Answer the number of elements in this tuple.