#DOCUMENTATION by cg
class: SequenceableCollection
protocol completeness
added:
#keyAtIdenticalValue:
#keyAtIdenticalValue:ifAbsent:
comment/format in:
#keyAtEqualValue:
#keyAtEqualValue:ifAbsent:
#keyAtValue:
#keyAtValue:ifAbsent:
--- a/SequenceableCollection.st Tue Feb 07 11:08:05 2017 +0100
+++ b/SequenceableCollection.st Tue Feb 07 11:11:22 2017 +0100
@@ -977,34 +977,80 @@
keyAtEqualValue:value
"return the index of a value.
- This is normally not used (use indexOf:), but makes the
- protocol more compatible with dictionaries."
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially.
+ NOTICE:
+ The value is searched using equality compare"
^ self indexOf:value
+
+ "Modified (comment): / 07-02-2017 / 11:10:10 / cg"
!
keyAtEqualValue:value ifAbsent:exceptionBlock
"return the index of a value.
- This is normally not used (use indexOf:), but makes the
- protocol more compatible with dictionaries."
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially.
+ NOTICE:
+ The value is searched using equality compare"
^ self indexOf:value ifAbsent:exceptionBlock
+
+ "Modified (comment): / 07-02-2017 / 11:10:03 / cg"
+!
+
+keyAtIdenticalValue:value
+ "return the identity index of a value.
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially."
+
+ ^ self identityIndexOf:value
+
+ "Created: / 07-02-2017 / 11:10:43 / cg"
+!
+
+keyAtIdenticalValue:value ifAbsent:exceptionBlock
+ "return the identity index of a value.
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially.
+ NOTICE:
+ The value is searched using identity compare"
+
+ ^ self identityIndexOf:value ifAbsent:exceptionBlock
+
+ "Created: / 07-02-2017 / 11:10:59 / cg"
!
keyAtValue:value
"return the index of a value.
- This is normally not used (use indexOf:), but makes the
- protocol more compatible with dictionaries."
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially.
+ NOTICE:
+ The value is searched using identity compare;
+ use #keyAtEqualValue: to compare for equality."
^ self identityIndexOf:value
+
+ "Modified (comment): / 07-02-2017 / 11:09:43 / cg"
!
keyAtValue:value ifAbsent:exceptionBlock
"return the index of a value.
- This is normally not used (use indexOf:), but makes the
- protocol more compatible with dictionaries."
+ This is normally not used (use indexOf:),
+ but makes the protocol more compatible with dictionaries.
+ This is a slow access, since the receiver is searched sequentially.
+ NOTICE:
+ The value is searched using identity compare;
+ use #keyAtEqualValue:ifAbsent: to compare for equality."
^ self identityIndexOf:value ifAbsent:exceptionBlock
+
+ "Modified (comment): / 07-02-2017 / 11:04:31 / cg"
!
last