X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
any
self isEmpty
ifTrue: [ ^ self errorEmptyCollection ].
^ values at: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
errorEmptyCollection
self error: 'Empty'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enumerating
noneSatisfy: aOneArgumentBlock
1 to: size do: [ :index |
(aOneArgumentBlock value: (values at: index)) ifTrue: [ ^ false ] ].
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
notEmpty
^ size ~= 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sorted: aTwoArgumentBlock
^ self values sorted: aTwoArgumentBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sorted
^ self values sorted
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sortedWith: aTwoArgumentBlock
^ self values sortedWith: aTwoArgumentBlock
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
"instance" : {
"removeKey:" : "lr 7/12/2007 13:18",
"associationsDo:" : "lr 8/20/2007 13:45",
"sorted:" : "pmm 9/9/2017 22:05",
"removeIndex:" : "jf 2/15/2010 14:33",
"any" : "pmm 9/9/2017 18:44",
"removeKey:ifAbsent:" : "jf 2/15/2010 14:40",
"values" : "lr 7/9/2007 10:38",
"sortedWith:" : "pmm 9/9/2017 18:56",
"at:ifAbsentPut:" : "lr 10/28/2007 14:42",
"values" : "lr 7/9/2007 10:38",
"keysAndValuesDo:" : "lr 6/7/2007 08:04",
"errorEmptyCollection" : "pmm 9/9/2017 18:41",
"includesKey:" : "lr 10/28/2007 14:42",
"findIndexFor:" : "lr 10/28/2007 14:42",
"notEmpty" : "pmm 9/9/2017 18:46",
"postCopy" : "lr 7/9/2007 07:50",
"size" : "lr 7/9/2007 10:38",
"add:" : "lr 7/25/2011 19:51",
"sorted" : "pmm 9/9/2017 18:56",
"do:" : "jf 12/29/2009 20:38",
"keysDo:" : "lr 8/17/2007 11:52",
"noneSatisfy:" : "pmm 9/9/2017 18:53",
"privateAt:put:" : "lr 6/6/2007 19:28",
"isCollection" : "jf 2/15/2010 15:47",
"at:" : "lr 10/28/2007 14:42",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
any
self isEmpty
ifTrue: [ ^ self errorEmptyCollection ].
^ table at: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
errorEmptyCollection
self error: 'Empty'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
enumerating
noneSatisfy: aOneArgumentBlock
size = 0 ifTrue: [ ^ true ].
2 to: size * 2 by: 2 do: [ :index |
(aOneArgumentBlock value: (table at: index)) ifTrue: [ ^ false ] ].
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
notEmpty
^ size ~= 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sorted: aTwoArgumentBlock
^ self values sorted: aTwoArgumentBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sorted
^ self values sorted
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sorting
sortedWith: aTwoArgumentBlock
^ self values sortedWith: aTwoArgumentBlock
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
"instance" : {
"removeKey:" : "lr 7/12/2007 13:18",
"associationsDo:" : "lr 8/20/2007 13:45",
"sorted:" : "pmm 9/9/2017 22:04",
"removeIndex:" : "pmm 8/22/2016 12:29",
"any" : "pmm 9/9/2017 18:45",
"removeKey:ifAbsent:" : "jf 2/15/2010 14:40",
"values" : "pmm 8/22/2016 12:34",
"sortedWith:" : "pmm 9/9/2017 18:57",
"at:ifAbsentPut:" : "pmm 8/22/2016 12:09",
"values" : "pmm 8/22/2016 12:34",
"keysAndValuesDo:" : "pmm 8/25/2016 15:04",
"errorEmptyCollection" : "pmm 9/9/2017 18:43",
"includesKey:" : "lr 10/28/2007 14:42",
"findIndexFor:" : "pmm 8/22/2016 12:17",
"notEmpty" : "pmm 9/9/2017 18:46",
"postCopy" : "pmm 8/22/2016 11:56",
"size" : "lr 7/9/2007 10:38",
"add:" : "lr 7/25/2011 19:51",
"sorted" : "pmm 9/9/2017 18:57",
"do:" : "pmm 8/22/2016 12:02",
"keysDo:" : "pmm 8/22/2016 12:18",
"noneSatisfy:" : "pmm 9/9/2017 18:51",
"privateAt:put:" : "pmm 8/22/2016 12:15",
"isCollection" : "jf 2/15/2010 15:47",
"at:" : "lr 10/28/2007 14:42",
Expand Down
2 changes: 1 addition & 1 deletion repository/Grease-Core.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Grease-Core-pmm.113' message 'Fix Symbol >> #greaseString- #46' id '6aeef6bc-2315-0d00-978c-877c07fe6076' date '9 September 2017' time '3:52:15.576904 pm' author 'pmm' ancestors ((name 'Grease-Core-pmm.111' message 'Small optimization- avoid message send in common case' id '347a901b-1115-0d00-9403-7ea904aeb9ca' date '8 September 2017' time '5:38:38.319353 pm' author 'pmm' ancestors ((name 'Grease-Core-pmm.110' message 'Add GRNotificationBasedDynamicVariable' id 'bc710350-d214-0d00-b70d-9dae0d40d3ce' date '5 September 2017' time '2:43:35.329414 pm' author 'pmm' ancestors () stepChildren ())) stepChildren ())) stepChildren ())
(name 'Grease-Core-pmm.114' message 'Add missing collection methods to GRSmallDictionary- #49' id '3afe7309-2915-0d00-9d79-d857043468d3' date '9 September 2017' time '10:11:33.677831 pm' author 'pmm' ancestors ((name 'Grease-Core-pmm.113' message 'Fix Symbol >> #greaseString- #46' id '6aeef6bc-2315-0d00-978c-877c07fe6076' date '9 September 2017' time '3:52:15.576904 pm' author 'pmm' ancestors ((name 'Grease-Core-pmm.111' message 'Small optimization- avoid message send in common case' id '347a901b-1115-0d00-9403-7ea904aeb9ca' date '8 September 2017' time '5:38:38.319353 pm' author 'pmm' ancestors ((name 'Grease-Core-pmm.110' message 'Add GRNotificationBasedDynamicVariable' id 'bc710350-d214-0d00-b70d-9dae0d40d3ce' date '5 September 2017' time '2:43:35.329414 pm' author 'pmm' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
configuration
createArbitraryAssociations
^ OrderedCollection new
add: 'c' -> 3;
add: 'a' -> 1;
add: 'b' -> 2;
add: 'e' -> 1;
add: 'd' -> 4;
yourself

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"assertAssociations:" : "jf 2/15/2010 16:05",
"testKeys" : "jf 2/15/2010 16:05",
"testAddAll" : "jf 2/15/2010 22:58",
"createArbitraryAssociations" : "pmm 9/9/2017 18:40",
"testKeysAndValuesDo" : "pmm 9/1/2012 15:33",
"testRemoveKey" : "pmm 9/1/2012 15:33",
"testWithAll" : "jf 2/15/2010 22:54",
"testIsCollection" : "jf 2/15/2010 16:05",
"testAt" : "jf 2/15/2010 16:05",
"testKeysDo" : "jf 2/15/2010 16:05",
"testAddAndAssociations" : "jf 2/15/2010 16:05",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commentStamp" : "",
"super" : "TestCase",
"super" : "GRAbstractDictionaryTest",
"category" : "Grease-Tests-Core",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down

Large diffs are not rendered by default.

X Tutup