Squeak Class Documentation category index | class index  
 
ShortIntegerArray
  category: Balloon-Collections
  superclass: ArrayedCollection
  subclasses: ShortPointArray

No comment. Sorry.

instance methods
  accessing
  at:
at:put:
defaultElement
size

  objects from disk
  restoreEndianness

  private
  pvtAt:
pvtAt:put:
swapShortObjects

class methods
  class initialization
  initialize
startUp
startUpFrom:
swapShortObjects

  instance creation
  new:

instance methods
  accessing top  
 

at:

Return the 16-bit integer value at the given index of the receiver.


 

at:put:

Store the given 16-bit integer at the given index in the receiver.


 

defaultElement


 

size

Answer how many elements the receiver contains.


  objects from disk top  
 

restoreEndianness

This word object was just read in from a stream. It was stored in Big Endian (Mac) format. Swap each pair of bytes (16-bit word), if the current machine is Little Endian.
Why is this the right thing to do? We are using memory as a byteStream. High and low bytes are reversed in each 16-bit word, but the stream of words ascends through memory. Different from a Bitmap.


  private top  
 

pvtAt:

Private -- for swapping only


 

pvtAt:put:

Private -- for swapping only


 

swapShortObjects

Private -- swap all the short quantities in the receiver


class methods
  class initialization top  
 

initialize

ShortIntegerArray initialize


 

startUp

Check if the word order has changed from the last save


 

startUpFrom:

In this case, do we need to swap word halves when reading this segement?


 

swapShortObjects


  instance creation top  
 

new:

Answer an instance of this class with the number of indexable
variables specified by the argument, sizeRequested.