Skip to content

Commit

Permalink
add FilterModel>>#= and #hash methods [feenkcom/gtoolkit#3983]
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Sep 27, 2024
1 parent dde3134 commit fe89f39
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/GToolkit-Coder-UI/GtFilterModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ Class {
#category : #'GToolkit-Coder-UI-Filters - Models'
}

{ #category : #comparing }
GtFilterModel >> = anObject [
self == anObject ifTrue: [ ^ true ].

^ self class = anObject class
and: [ self label = anObject label
and: [ self order = anObject order ] ]
]

{ #category : #announcer }
GtFilterModel >> announcer [
<return: #Announcer>
Expand Down Expand Up @@ -71,6 +80,13 @@ GtFilterModel >> gtLiveFor: aView [
margin: (BlInsets all: 10) ]
]

{ #category : #comparing }
GtFilterModel >> hash [
^ self class hash
bitXor: (self label hash
bitXor: self order hash)
]

{ #category : #accessing }
GtFilterModel >> label [
"Return filter label"
Expand Down

0 comments on commit fe89f39

Please sign in to comment.