--- a/MCDictionaryRepository.st Wed Feb 12 15:53:32 2014 +0100
+++ b/MCDictionaryRepository.st Wed Feb 12 15:53:33 2014 +0100
@@ -14,28 +14,7 @@
^self basicNew initialize
! !
-
-!MCDictionaryRepository methodsFor:'as yet unclassified'!
-
-= other
- ^ self == other
-!
-
-allVersionInfos
- ^ dict values collect: [:ea | ea info]
-!
-
-basicStoreVersion: aVersion
- dict at: aVersion info put: aVersion
-!
-
-closestAncestorVersionFor: anAncestry ifNone: errorBlock
- | info |
- info := anAncestry breadthFirstAncestors
- detect: [:ea | self includesVersionWithInfo: ea]
- ifNone: [^ errorBlock value].
- ^ self versionWithInfo: info
-!
+!MCDictionaryRepository methodsFor:'accessing'!
description
@@ -55,23 +34,14 @@
dictionary: aDictionary
dict := aDictionary
-!
+! !
-includesVersionNamed: aString
- ^ dict anySatisfy: [:ea | ea info name = aString]
-!
+!MCDictionaryRepository methodsFor:'as yet unclassified'!
includesVersionWithInfo: aVersionInfo
^ dict includesKey: aVersionInfo
!
-initialize
-
- super initialize.
- dict := Dictionary new.
-
-!
-
sortedVersionInfos
| sorter |
sorter := MCVersionSorter new.
@@ -84,16 +54,56 @@
^ dict at: aVersionInfo ifAbsent: errorBlock
! !
+!MCDictionaryRepository methodsFor:'comparing'!
+
+= other
+ ^ self == other
+! !
+
+!MCDictionaryRepository methodsFor:'initialization'!
+
+initialize
+
+ super initialize.
+ dict := Dictionary new.
+
+! !
+
+!MCDictionaryRepository methodsFor:'printing & storing'!
+
+basicStoreVersion: aVersion
+ dict at: aVersion info put: aVersion
+! !
+
+!MCDictionaryRepository methodsFor:'queries'!
+
+allVersionInfos
+ ^ dict values collect: [:ea | ea info]
+!
+
+closestAncestorVersionFor: anAncestry ifNone: errorBlock
+ | info |
+ info := anAncestry breadthFirstAncestors
+ detect: [:ea | self includesVersionWithInfo: ea]
+ ifNone: [^ errorBlock value].
+ ^ self versionWithInfo: info
+!
+
+includesVersionNamed: aString
+ ^ dict anySatisfy: [:ea | ea info name = aString]
+! !
+
!MCDictionaryRepository class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCDictionaryRepository.st,v 1.4 2012-09-11 21:21:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCDictionaryRepository.st,v 1.5 2014-02-12 14:53:33 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCDictionaryRepository.st,v 1.4 2012-09-11 21:21:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCDictionaryRepository.st,v 1.5 2014-02-12 14:53:33 cg Exp $'
!
version_SVN
- ^ '§Id: MCDictionaryRepository.st 7 2010-09-12 07:18:55Z vranyj1 §'
+ ^ '$Id: MCDictionaryRepository.st,v 1.5 2014-02-12 14:53:33 cg Exp $'
! !
+