Category: Collections-Sequenceable
Superclass: ArrayedCollection
My instances represent ranges of objects, typically Number type objects. I provide iteration/enumeration messages for producing all the members that my instance represents.

Method category index

instance creation (class)
basic (instance)
printing (instance)
storing (instance)
testing (instance)

instance creation (class)

from: startInteger to: stopInteger
Answer an Interval going from startInteger to the stopInteger, with a step of 1

from: startInteger to: stopInteger by: stepInteger

Answer an Interval going from startInteger to the stopInteger, with a step of stepInteger

withAll: aCollection

Answer an Interval containing the same elements as aCollection. Fail if it is not possible to create one.

top


basic (instance)

at: index
Answer the index-th element of the receiver.

at: index put: anObject

This method should not be called for instances of this class.

collect: aBlock

Evaluate the receiver for each element in aBlock, collect in an array the result of the evaluations.

copyFrom: startIndex to: stopIndex

Not commented.

do: aBlock

Evaluate the receiver for each element in aBlock

isEmpty

Answer whether the receiver is empty.

reverse

Answer a copy of the receiver with all of its items reversed

size

Answer the number of elements in the receiver.

species

Answer `Array'.

top


printing (instance)

first
Not commented.

increment

Answer `step'.

last

Answer the last value.

printOn: aStream

Print a representation for the receiver on aStream

top


storing (instance)

storeOn: aStream
Store Smalltalk code compiling to the receiver on aStream

top


testing (instance)

= anInterval
Answer whether anInterval is the same interval as the receiver

hash

Answer an hash value for the receiver

isExact

Answer whether elements of the receiver are computed using exact arithmetic. This is true as long as the start and step value are exact (i.e. not floating-point).

top