X Tutup
Skip to content

Commit 17ce0ca

Browse files
committed
Add missing collection methods to GRSmallDictionary
Fixes SeasideSt#49
1 parent cc02510 commit 17ce0ca

File tree

22 files changed

+80
-9
lines changed

22 files changed

+80
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
accessing
2+
any
3+
self isEmpty
4+
ifTrue: [ ^ self errorEmptyCollection ].
5+
^ values at: 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
private
2+
errorEmptyCollection
3+
self error: 'Empty'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
enumerating
2+
noneSatisfy: aOneArgumentBlock
3+
1 to: size do: [ :index |
4+
(aOneArgumentBlock value: (values at: index)) ifTrue: [ ^ false ] ].
5+
^ true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
testing
2+
notEmpty
3+
^ size ~= 0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sorting
2+
sorted: aTwoArgumentBlock
3+
^ self values sorted: aTwoArgumentBlock
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sorting
2+
sorted
3+
^ self values sorted
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sorting
2+
sortedWith: aTwoArgumentBlock
3+
^ self values sortedWith: aTwoArgumentBlock

repository/Grease-Core.package/GRSmallDictionary.class/methodProperties.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@
22
"instance" : {
33
"removeKey:" : "lr 7/12/2007 13:18",
44
"associationsDo:" : "lr 8/20/2007 13:45",
5+
"sorted:" : "pmm 9/9/2017 22:05",
56
"removeIndex:" : "jf 2/15/2010 14:33",
7+
"any" : "pmm 9/9/2017 18:44",
68
"removeKey:ifAbsent:" : "jf 2/15/2010 14:40",
7-
"values" : "lr 7/9/2007 10:38",
9+
"sortedWith:" : "pmm 9/9/2017 18:56",
810
"at:ifAbsentPut:" : "lr 10/28/2007 14:42",
11+
"values" : "lr 7/9/2007 10:38",
912
"keysAndValuesDo:" : "lr 6/7/2007 08:04",
13+
"errorEmptyCollection" : "pmm 9/9/2017 18:41",
1014
"includesKey:" : "lr 10/28/2007 14:42",
1115
"findIndexFor:" : "lr 10/28/2007 14:42",
16+
"notEmpty" : "pmm 9/9/2017 18:46",
1217
"postCopy" : "lr 7/9/2007 07:50",
1318
"size" : "lr 7/9/2007 10:38",
1419
"add:" : "lr 7/25/2011 19:51",
20+
"sorted" : "pmm 9/9/2017 18:56",
1521
"do:" : "jf 12/29/2009 20:38",
1622
"keysDo:" : "lr 8/17/2007 11:52",
23+
"noneSatisfy:" : "pmm 9/9/2017 18:53",
1724
"privateAt:put:" : "lr 6/6/2007 19:28",
1825
"isCollection" : "jf 2/15/2010 15:47",
1926
"at:" : "lr 10/28/2007 14:42",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
accessing
2+
any
3+
self isEmpty
4+
ifTrue: [ ^ self errorEmptyCollection ].
5+
^ table at: 2
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
private
2+
errorEmptyCollection
3+
self error: 'Empty'

0 commit comments

Comments
 (0)
X Tutup