--- a/ImmutableArray.st Mon Mar 08 12:14:12 2021 +0000
+++ b/ImmutableArray.st Mon Aug 31 17:20:18 2020 +0100
@@ -128,6 +128,12 @@
^ self
!
+asImmutableCollection
+ ^ self
+
+ "Created: / 15-03-2019 / 13:53:03 / Stefan Vogel"
+!
+
asMutableCollection
"return a writable copy of myself"
@@ -135,9 +141,11 @@
!
asNewArray
- "return the receiver as an unique new array."
+ "return the receiver as a unique new array."
^ self copy
+
+ "Modified (comment): / 12-06-2017 / 13:40:44 / mawalch"
!
beImmutable
@@ -154,18 +162,6 @@
!ImmutableArray methodsFor:'copying'!
-postCopy
- "when copied, make it me a real (mutable) Array"
-
- self changeClassTo:Array.
-!
-
-postDeepCopy
- "when copied, make it me a real (mutable) Array"
-
- self changeClassTo:Array.
-!
-
shallowCopy
"when copying, return a real (mutable) Array"
@@ -179,6 +175,20 @@
"
! !
+!ImmutableArray methodsFor:'copying-private'!
+
+postCopy
+ "when copied, make it me a real (mutable) Array"
+
+ self changeClassTo:Array.
+!
+
+postDeepCopy
+ "when copied, make it me a real (mutable) Array"
+
+ self changeClassTo:Array.
+! !
+
!ImmutableArray methodsFor:'private'!
species
@@ -196,7 +206,12 @@
!ImmutableArray methodsFor:'queries'!
isImmutable
+ "return true, if the receiver is immutable.
+ Since I am an immutable array, return always true here"
+
^ true
+
+ "Modified (comment): / 09-06-2019 / 14:54:41 / Claus Gittinger"
!
isLiteral