|
Class: UnboxedIntegerArray
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
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.
copyrightCOPYRIGHT (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.
instance creation
-
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
-
isAbstract
-
Return if this class is an abstract class.
True is returned for UnboxedIntegerArray here; false for subclasses.
Abstract subclasses must redefine this again.
-
isValidElement: anObject
-
return true, if instances of me can hold this kind of object
printing
-
printOn: aStream base: radix showRadix: showRadix
-
append a printed representation to aStream in the given number base.
queries
-
defaultElement
-
testing
-
isIntegerArray
-
return true if the receiver has integer elements.
These are Byte- and Integer arrays; both signed and unsigned
|