ByteArray.st
branchjv
changeset 20344 152b525b5c63
parent 20143 c64b16f62536
parent 20306 07ff17265c6b
child 20579 9add81aadb7a
--- a/ByteArray.st	Thu Aug 25 11:28:17 2016 +0100
+++ b/ByteArray.st	Wed Aug 31 22:45:49 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -165,8 +167,6 @@
 
 
 
-
-
 !ByteArray class methodsFor:'queries'!
 
 elementByteSize
@@ -202,7 +202,6 @@
 ! !
 
 
-
 !ByteArray methodsFor:'Compatibility-Squeak'!
 
 bitXor:aByteArray
@@ -2860,6 +2859,14 @@
     ^ false.
 !
 
+isValidElement:anObject
+    "return true, if I can hold this kind of object"
+
+    ^ anObject isInteger
+    and:[ (anObject >= self class minVal)
+    and:[ (anObject <= self class maxVal) ]]
+!
+
 max
     "return the maximum value in the receiver -
      redefined to speedup image processing and sound-player
@@ -3214,7 +3221,6 @@
     "Modified: 22.4.1996 / 12:55:30 / cg"
 ! !
 
-
 !ByteArray class methodsFor:'documentation'!
 
 version