Browse Source

Comments for {Indexable,Sequencable}Collection.

Herbert Vojčík 11 năm trước cách đây
mục cha
commit
7270aaa813
2 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 2 0
      js/Kernel-Collections.js
  2. 9 0
      st/Kernel-Collections.st

+ 2 - 0
js/Kernel-Collections.js

@@ -1035,6 +1035,7 @@ smalltalk.Collection.klass);
 
 
 smalltalk.addClass('IndexableCollection', smalltalk.Collection, [], 'Kernel-Collections');
+smalltalk.IndexableCollection.comment="An IndexableCollection is a key-value store, that is,\x0ait stores values under indexes.\x0a\x0aAs a rule of thumb, if a collection has at: and at:put:,\x0ait is an IndexableCollection."
 
 
 smalltalk.addClass('HashedCollection', smalltalk.IndexableCollection, [], 'Kernel-Collections');
@@ -2077,6 +2078,7 @@ smalltalk.Dictionary);
 
 
 smalltalk.addClass('SequenceableCollection', smalltalk.IndexableCollection, [], 'Kernel-Collections');
+smalltalk.SequenceableCollection.comment="A SequencableCollection is an IndexableCollection\x0awith numeric indexes starting with 1.\x0a"
 smalltalk.addMethod(
 "__eq",
 smalltalk.method({

+ 9 - 0
st/Kernel-Collections.st

@@ -305,6 +305,12 @@ withAll: aCollection
 Collection subclass: #IndexableCollection
 	instanceVariableNames: ''
 	package: 'Kernel-Collections'!
+!IndexableCollection commentStamp!
+An IndexableCollection is a key-value store, that is,
+it stores values under indexes.
+
+As a rule of thumb, if a collection has at: and at:put:,
+it is an IndexableCollection.!
 
 IndexableCollection subclass: #HashedCollection
 	instanceVariableNames: ''
@@ -646,6 +652,9 @@ includesKey: aKey
 IndexableCollection subclass: #SequenceableCollection
 	instanceVariableNames: ''
 	package: 'Kernel-Collections'!
+!SequenceableCollection commentStamp!
+A SequencableCollection is an IndexableCollection
+with numeric indexes starting with 1.!
 
 !SequenceableCollection methodsFor: 'accessing'!