Order:
Filter:
Classes | Collections > Ordered

Order : SequenceableCollection : Collection : Object

an order of elements with a numerical index
Subclasses: SparseArray

Description

Keeps elements in an order and allows to put them at arbitrary slots without having to allocate a large array.

NOTE: -put and -at are slower than in IdentityDictionary / PriorityQueue, -do is faster.

Class Methods

Order.new(size: 8)

Create a new order.

Order.newFromIndices(array, indices)

Create a new order from given items and indices.

Inherited class methods

Instance Methods

.doRange(function, from: 0, to)

Iterate over a range of the order's items.

.pos

Return the current write position.

Inherited instance methods

Undocumented instance methods

.add(obj)

.array

.array = value

.asArray

.at(index)

.choose

.clear(size)

.collect(function)

.copy

.do(function)

.indices

.indices = value

.indicesDo(function)

.keysValuesDo(function)

.lastIndex

.makeEmpty

.pop

.put(index, obj)

.reject(function)

.rejectInPlace(function)

.removeAllSuchThat(function)

.removeAt(index, obj)

.removeAtSlot(slot)

.select(function)

.selectInPlace(function)

.size

.species

Examples