IntsRef

Represents int[], as a slice (offset + length) into an existing int[]. The .ints member should never be null; use .EMPTY_INTS if necessary.

Constructors

Link copied to clipboard
constructor()

Create a IntsRef with .EMPTY_INTS

constructor(capacity: Int)

Create a IntsRef pointing to a new array of size capacity. Offset and length will both be zero.

constructor(ints: IntArray, offset: Int, length: Int)

This instance will directly reference ints w/o making a copy. ints should not be null.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The contents of the IntsRef. Should never be null.

Link copied to clipboard
Link copied to clipboard
var length: Int

Length of used ints.

Link copied to clipboard
var offset: Int

Offset of first valid integer.

Functions

Link copied to clipboard
open override fun clone(): IntsRef

Returns a shallow clone of this instance (the underlying ints are not copied and will be shared by both the returned object and this object.

Link copied to clipboard
open operator override fun compareTo(other: IntsRef): Int

Signed int order comparison

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String