Skip to content

Commit

Permalink
Revert "FMMultivalueLink inherits from SequenceableCollection"
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc authored and Gabriel-Darbord committed Dec 18, 2023
1 parent 48515e0 commit 5ed3143
Showing 1 changed file with 53 additions and 11 deletions.
64 changes: 53 additions & 11 deletions src/Fame-Core/FMMultivalueLink.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ that refers to it are updated accordingly.
"
Class {
#name : #FMMultivalueLink,
#superclass : #SequenceableCollection,
#superclass : #Collection,
#instVars : [
'values',
'owner',
Expand All @@ -41,12 +41,6 @@ Class {
#category : #'Fame-Core-Utilities'
}

{ #category : #'instance creation' }
FMMultivalueLink class >> new: size [

^ self new setCollection: (OrderedCollection new: size)
]

{ #category : #'instance creation' }
FMMultivalueLink class >> on: element opposite: oppositeSelector [
^ self new
Expand Down Expand Up @@ -125,16 +119,50 @@ FMMultivalueLink >> do: aBlock [
values do: aBlock
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> eighth [
^ self at: 8
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> fifth [
^ self at: 5
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> first [
^ self at: 1
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> fourth [
^ self at: 4
]

{ #category : #comparing }
FMMultivalueLink >> hash [
"From sequenceable collection"
| hash |
hash := self species hash.
1 to: self size do: [ :i | hash := (hash + (self at: i) hash) hashMultiply ].
^ hash
]

{ #category : #iterators }
FMMultivalueLink >> iterator [
^ values iterator
]

{ #category : #accessing }
{ #category : #'accessing-computed' }
FMMultivalueLink >> last [
^ values last
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> ninth [
^ self at: 9
]

{ #category : #copying }
FMMultivalueLink >> postCopy [

Expand Down Expand Up @@ -162,10 +190,19 @@ FMMultivalueLink >> removeAll [
do: [ :anElement | anElement perform: opposite with: nil ]
]

{ #category : #initialization }
FMMultivalueLink >> setCollection: aCollection [
{ #category : #'accessing-computed' }
FMMultivalueLink >> second [
^ self at: 2
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> seventh [
^ self at: 7
]

values := aCollection
{ #category : #'accessing-computed' }
FMMultivalueLink >> sixth [
^ self at: 6
]

{ #category : #accessing }
Expand All @@ -180,6 +217,11 @@ FMMultivalueLink >> species [
^OrderedCollection
]

{ #category : #'accessing-computed' }
FMMultivalueLink >> third [
^ self at: 3
]

{ #category : #private }
FMMultivalueLink >> unsafeAdd: element [
(values includes: element)
Expand Down

0 comments on commit 5ed3143

Please sign in to comment.