A_String

interface A_String : A_Tuple

A_String is an interface that specifies the string-specific operations that an AvailObject must implement. It's a sub-interface of A_Tuple (which is itself a sub-interface of A_BasicObject.

Author

Mark van Gulik

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A construct for mapping indices within Avail strings, which can contain code points up to 0x10FFFF, to and from indices in the corresponding Java strings, which must use two UTF-16 code points (a surrogate pair) for any character above 0xFFFF.

Properties

Link copied to clipboard

Construct a Java set from the receiver, a tuple.

Link copied to clipboard

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

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

Link copied to clipboard

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

Link copied to clipboard

Answer the number of children this tree tuple contains.

Link copied to clipboard
abstract val isAbstract: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isAtom: Boolean

Is the receiver an Avail atom?

Link copied to clipboard
abstract val isBoolean: Boolean

Is the receiver an Avail boolean?

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val isByteString: Boolean

Is the receiver an Avail byte string?

Link copied to clipboard
abstract val isByteTuple: Boolean

Is the receiver an Avail byte tuple?

Link copied to clipboard

Is the receiver an Avail extended integer?

Link copied to clipboard
abstract val isFinite: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isFunction: Boolean

Is the receiver an Avail function?

Link copied to clipboard
abstract val isInstanceMeta: Boolean
Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
abstract val isIntTuple: Boolean

Is the receiver an Avail IntTupleDescriptor? This is conservative, in that some object tuples may only contain ints but not be reported as being int tuples.

Link copied to clipboard
Link copied to clipboard
abstract val isLongTuple: Boolean

Is the receiver an Avail LongTupleDescriptor? This is conservative, in that some object tuples may only contain longs but not be reported as being long tuples.

Link copied to clipboard
abstract val isMap: Boolean

Is the receiver an Avail map?

Link copied to clipboard
abstract val isMapType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open val isNil: Boolean

Test if the receiver is the nil value.

Link copied to clipboard
abstract val isNybble: Boolean

Is the receiver an Avail nybble?

Link copied to clipboard
abstract val isPojo: Boolean
Link copied to clipboard
abstract val isPojoArrayType: Boolean
Link copied to clipboard
abstract val isPojoFusedType: Boolean
Link copied to clipboard
abstract val isPojoSelfType: Boolean
Link copied to clipboard
abstract val isPojoType: Boolean
Link copied to clipboard
abstract val isRawPojo: Boolean
Link copied to clipboard
Link copied to clipboard
abstract val isSetType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard
abstract val isString: Boolean

Is the receiver an Avail string?

Link copied to clipboard
abstract val isTokenType: Boolean
Link copied to clipboard
abstract val isTuple: Boolean

Is the receiver an Avail tuple?

Link copied to clipboard
abstract val isTupleType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isTwoByteString: Boolean

Is the receiver an Avail two-byte string?

Link copied to clipboard
abstract val isType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isUnsignedByte: Boolean

Is the receiver an Avail unsigned byte?

Link copied to clipboard
Link copied to clipboard
open val notNil: Boolean

Test if the receiver is not the nil value.

Link copied to clipboard
Link copied to clipboard

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

Answer the number of elements in this tuple.

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

Construct a Java string from the receiver, an Avail string.

Link copied to clipboard
abstract fun becomeIndirectionTo(anotherObject: A_BasicObject)

Turn the receiver into an indirection to the specified object.

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.

fun A_Tuple.compareFromToWithTwentyOneBitStringStartingAt(startIndex1: Int, endIndex1: Int, aTwentyOneBitString: A_String, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given twenty-one-bit 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.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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun A_String.copyStringFromToCanDestroy(start: Int, end: Int, canDestroy: Boolean): A_String

Even though A_Tuple.copyTupleFromToCanDestroy would perform the same activity, this method returns the stronger A_String type as a convenience, when the code knows it's working on strings.

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

Utility method for decomposing this object in the debugger.

Link copied to clipboard

Retrieve the object's {@linkplain AbstractDescriptor descriptor}.

Link copied to clipboard

Dispatcher helper function for routing messages to the descriptor.

Link copied to clipboard
abstract fun enumerationIncludesInstance(potentialInstance: AvailObject): Boolean
Link copied to clipboard
abstract fun equals(another: A_BasicObject): Boolean

Answer whether the receiver and the argument, both A_BasicObjects, are equal in value.

abstract operator override fun equals(other: Any?): Boolean

{@inheritDoc}

Link copied to clipboard
abstract fun equalsAnyTuple(aTuple: A_Tuple): Boolean

Answer whether the receiver, an object, and the argument, a tuple, are equal in value.

Link copied to clipboard
abstract fun equalsByteArrayTuple(aByteArrayTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsByteBufferTuple(aByteBufferTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsByteString(aByteString: A_String): Boolean

Answer whether the receiver, an object, and the argument, a byte string, are equal in value.

Link copied to clipboard
abstract fun equalsByteTuple(aByteTuple: A_Tuple): Boolean

Answer whether the receiver, an object, and the argument, a byte tuple, are equal in value.

Link copied to clipboard
abstract fun equalsCompiledCode(aCompiledCode: A_RawFunction): Boolean

Answer whether the arguments, an object and a compiled code, are equal.

Link copied to clipboard
abstract fun equalsCompiledCodeType(aCompiledCodeType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsContinuation(aContinuation: A_Continuation): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsContinuationType(aContinuationType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsEnumerationType(anEnumerationType: A_BasicObject): Boolean
Link copied to clipboard

Determine whether the receiver is an enumeration with the given set of instances.

Link copied to clipboard
abstract fun equalsEqualityRawPojoFor(otherEqualityRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
abstract fun equalsFiberType(aFiberType: A_Type): Boolean

Answer whether the receiver, an object, and the argument, a fiber type, are equal in value.

Link copied to clipboard
abstract fun equalsFunction(aFunction: A_Function): Boolean

Answer whether the receiver, an object, and the argument, a function, are equal in value.

Link copied to clipboard
abstract fun equalsFunctionType(aFunctionType: A_Type): Boolean

Answer whether the receiver, an object, and the argument, a function type, are equal.

Link copied to clipboard
abstract fun equalsInstanceTypeFor(anInstanceType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsIntegerIntervalTuple(anIntegerIntervalTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsIntegerRangeType(anIntegerRangeType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsIntTuple(anIntTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsListNodeType(listNodeType: A_Type): Boolean

Answer whether this value equals the given list phrase type.

Link copied to clipboard
abstract fun equalsLiteralTokenType(aLiteralTokenType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsLongTuple(aLongTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsMap(aMap: A_Map): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsMapType(aMapType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsNybbleTuple(aNybbleTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObject(anObject: AvailObject): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObjectTuple(anObjectTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObjectType(anObjectType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPhraseType(aPhraseType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsPojo(aPojo: AvailObject): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun equalsPojoField(field: AvailObject, receiver: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPojoType(aPojoType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPrimitiveType(aPrimitiveType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsRawPojoFor(otherRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
abstract fun equalsRepeatedElementTuple(aRepeatedElementTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsReverseTuple(aTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsSetType(aSetType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsSmallIntegerIntervalTuple(aSmallIntegerIntervalTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsToken(aToken: A_Token): Boolean
Link copied to clipboard
abstract fun equalsTokenType(aTokenType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsTupleType(aTupleType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsTwentyOneBitString(aTwentyOneBitString: A_String): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsTwoByteString(aTwoByteString: A_String): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsVariableType(aVariableType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard

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
abstract fun fieldAt(field: A_Atom): AvailObject

Extract a field from an object.

Link copied to clipboard
abstract fun fieldAtIndex(index: Int): AvailObject

Extract a field from an object, using a one-based index into the field slots. This requires knowledge of the ObjectLayoutVariant, since the same field is at different indices in different variants.

Link copied to clipboard
abstract fun fieldAtOrNull(field: A_Atom): AvailObject?

Extract a field from an object, or answer null if it's not present.

Link copied to clipboard
abstract fun fieldAtPuttingCanDestroy(field: A_Atom, value: A_BasicObject, canDestroy: Boolean): A_BasicObject

Add or replace a field of an object.

Link copied to clipboard
abstract fun fieldMap(): A_Map

Dispatch to the descriptor.

Link copied to clipboard
abstract fun fieldTuple(): A_Tuple
Link copied to clipboard
abstract fun fieldTypeAt(field: A_Atom): A_Type

Extract a field type from an object type.

Link copied to clipboard
abstract fun fieldTypeAtIndex(index: Int): A_Type

Extract a field type from an object type, using the given field index, which is specific to an ObjectLayoutVariant.

Link copied to clipboard
abstract fun fieldTypeAtOrNull(field: A_Atom): A_Type?

Extract a field type from an object type, or null if it's not present.

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.firstIndexOfOr(value: A_BasicObject, otherValue: A_BasicObject, startIndex: Int, endIndex: Int): Int

Search for one of two particular values in the tuple, starting at the given index and working forward. The first match of either value or otherValue ends the search.

Link copied to clipboard
open fun forEach(p0: Consumer<in AvailObject>)
Link copied to clipboard
abstract fun hash(): Int

Compute the 32-bit hash of the receiver.

Link copied to clipboard
abstract override fun hashCode(): Int
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
abstract fun hashOrZero(): Int

Dispatch to the descriptor.

Link copied to clipboard
open fun <T : A_BasicObject> ifNil(action: () -> T): T

If the receiver isNil, evaluate the action. Answer either the non-nil receiver, or the result of the action.

Link copied to clipboard
open fun <T : A_BasicObject> ifNotNil(action: (T) -> Unit)

If the receiver is notNil, evaluate the action with it.

Link copied to clipboard
abstract fun integerSlotsCount(): Int

Answer the number of integer slots. All variable integer slots occur following the last fixed integer slot.

Link copied to clipboard

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
abstract fun isInstanceOf(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun isInstanceOfKind(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract operator fun iterator(): Iterator<AvailObject>
Link copied to clipboard
abstract fun javaAncestors(): AvailObject
Link copied to clipboard
abstract fun javaClass(): A_BasicObject
Link copied to clipboard
abstract fun <T : Any> javaObject(): T?
Link copied to clipboard
abstract fun <T : Any> javaObjectNotNull(): T
Link copied to clipboard
abstract fun kind(): A_Type

Dispatch to the descriptor.

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
abstract fun <T> lock(body: () -> T): T

Lock the fiber during evaluation of the Supplier, and return the produced value.

Link copied to clipboard
abstract fun makeImmutable(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
abstract fun makeImmutableInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

The receiver is marked with an IMMUTABLE descriptor, but its subobjects have not yet been made immutable. Scan them now, and do any additional fix-ups necessary for the kind of object.

Link copied to clipboard
abstract fun makeShared(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
abstract fun makeSharedInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

The receiver is marked with a SHARED descriptor, but its subobjects have not yet been made shared. Scan them now, and do any additional fix-ups necessary for the kind of object.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
open fun <T : A_BasicObject, O : A_BasicObject> mapNotNil(action: (T) -> O): O

If the receiver is notNil, evaluate the action with it, answering the value produced by the action. If the receiver was nil, answer nil cast to the action's output type.

Link copied to clipboard
inline fun <T, R> Iterable<T>.mapToSet(destination: MutableSet<R> = mutableSetOf(), transform: (T) -> R): MutableSet<R>

Transform the receiver via the supplied function and collect the results into an optionally provided set. Answer the result set.

Link copied to clipboard
abstract fun marshalToJava(classHint: Class<*>?): Any?
Link copied to clipboard
abstract fun nameForDebugger(): String

Answer a name suitable for labeling a field containing this object.

Link copied to clipboard
abstract fun objectSlotsCount(): Int

Answer the number of object slots in this AvailObject. All variable object slots occur following the last fixed object slot.

Link copied to clipboard

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
abstract fun pojoSelfType(): A_Type
Link copied to clipboard
abstract fun printOnAvoidingIndent(builder: StringBuilder, recursionMap: IdentityHashMap<A_BasicObject, Void>, indent: Int)

Recursively print the receiver to the builder unless it is already present in the recursionMap. Printing will begin at the specified indent level, measured in horizontal tab characters.

Link copied to clipboard

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
abstract fun rawPojo(): AvailObject
Link copied to clipboard

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

Dispatch to the descriptor.

Link copied to clipboard
abstract fun resultType(): A_Type
Link copied to clipboard
abstract fun sameAddressAs(anotherObject: A_BasicObject): Boolean

Answer whether the objects occupy the same memory addresses.

Link copied to clipboard
abstract fun scanSubobjects(visitor: (AvailObject) -> AvailObject)

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard
abstract fun setDescriptor(newDescriptor: AbstractDescriptor)

Replace the object's {@linkplain AbstractDescriptor descriptor}.

Link copied to clipboard
abstract fun setHashOrZero(value: Int)

Dispatch to the descriptor.

Link copied to clipboard
abstract fun setToInvalidDescriptor()

Replace my descriptor field with a FillerDescriptor. This blows up for most messages, catching incorrect (all, by definition) further accidental uses of this object.

Link copied to clipboard

Answer whether to show value-specific content in the file name for the debugger.

Link copied to clipboard
Link copied to clipboard

Returns a sequential Stream with this tuple as its source.

Link copied to clipboard
inline fun <R> A_BasicObject.synchronizeIf(syncCondition: Boolean, body: A_BasicObject.() -> R): R

If the provided condition is true, synchronize with the receiver's monitor around the execution of the body function. Otherwise, run the body function without synchronization.

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
abstract fun traversed(): AvailObject

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target.

Link copied to clipboard

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden immutable->mutable references. Only used during makeImmutable.

Link copied to clipboard

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden shared->unshared references. Only used during makeShared.

Link copied to clipboard

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

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

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

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

Link copied to clipboard

Answer the number of variable integer slots in this object. This does not include the fixed integer slots.

Link copied to clipboard

Answer the number of variable object slots in this AvailObject. This does not include the fixed object slots.

Link copied to clipboard
abstract fun writeSummaryTo(writer: JSONWriter)
Link copied to clipboard
abstract fun writeTo(writer: JSONWriter)