My instances represent ranges of objects, typically Number type
objects. I provide iteration/enumeration messages for producing all the
members that my instance represents.
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.
1.91.2 Interval: basic
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'.
1.91.3 Interval: printing
first
Not commented.
increment
Answer `step'.
last
Answer the last value.
printOn: aStream
Print a representation for the receiver on aStream
1.91.4 Interval: storing
storeOn: aStream
Store Smalltalk code compiling to the receiver on aStream
1.91.5 Interval: testing
= 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).
This document was generated
on April, 16 2013
using texi2html