eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UnboxedIntegerArray':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UnboxedIntegerArray


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--UninterpretedBytes
               |
               +--AbstractNumberVector
                  |
                  +--UnboxedIntegerArray
                     |
                     +--IntegerArray
                     |
                     +--LongIntegerArray
                     |
                     +--SignedIntegerArray
                     |
                     +--SignedLongIntegerArray
                     |
                     +--SignedWordArray
                     |
                     +--WordArray

Package:
stx:libbasic
Category:
Collections-Arrayed
Version:
rev: 1.8 date: 2021/06/06 08:27:59
user: cg
file: UnboxedIntegerArray.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


An abstract superclass for all unboxed integer classes.
In contrast to normal arrays (which store pointers to their elements),
unboxedIntegerArrays store the values in a dense & compact way. 
Since the representation fits corresponding underlying C-language representations,
these are also useful to pass bulk data to/from C primitive code.

copyright

COPYRIGHT (c) 2003 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  new: size elementBitSize: nBitsPerElement signed: signedBoolean
return a new instance for size elements,
each holding an nBitsPerElement-sized integer.
With nBitsPerElement == 8, this returns a byteArray/signedByteArray,
with nBitsPerElement == 16, a word/signedWordArray
with nBitsPerElement == 32, an integer/signedIntegerArray
and with nBitsPerElement == 65, a longInteger/signedLongIntegerArray
Other sizes might be provided in the future.

Usage example(s):

     self new:10 elementBitSize:8 signed:false
     self new:10 elementBitSize:8 signed:true
     self new:10 elementBitSize:16 signed:true
     self new:10 elementBitSize:64 signed:true

queries
o  isAbstract
Return if this class is an abstract class.
True is returned for UnboxedIntegerArray here; false for subclasses.
Abstract subclasses must redefine this again.

o  isValidElement: anObject
return true, if instances of me can hold this kind of object


Instance protocol:

printing
o  printOn: aStream base: radix showRadix: showRadix
append a printed representation to aStream in the given number base.

queries
o  defaultElement

testing
o  isIntegerArray
return true if the receiver has integer elements.
These are Byte- and Integer arrays; both signed and unsigned



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 08:01:16 GMT