MCPcopy
hub / github.com/minio/minio-go / Equals

Method Equals

pkg/set/set.go:114–129  ·  view source on GitHub ↗

Equals - checks whether given set is equal to current set or not.

(sset Set[T])

Source from the content-addressed store, hash-verified

112
113// Equals - checks whether given set is equal to current set or not.
114func (set Set[T]) Equals(sset Set[T]) bool {
115 // If length of set is not equal to length of given set, the
116 // set is not equal to given set.
117 if len(set) != len(sset) {
118 return false
119 }
120
121 // As both sets are equal in length, check each elements are equal.
122 for k := range set {
123 if _, ok := sset[k]; !ok {
124 return false
125 }
126 }
127
128 return true
129}
130
131// Intersection - returns the intersection with given set as new set.
132func (set Set[T]) Intersection(sset Set[T]) Set[T] {

Callers 15

getInUsePolicyFunction · 0.45
removeBucketActionsFunction · 0.45
removeStatementsFunction · 0.45
appendStatementFunction · 0.45
getBucketPolicyFunction · 0.45
getObjectPolicyFunction · 0.45
TestIntSetEqualsFunction · 0.45
TestIntSetIntersectionFunction · 0.45
TestIntSetDifferenceFunction · 0.45
TestIntSetUnionFunction · 0.45
TestIntSetCopyFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestIntSetEqualsFunction · 0.36
TestIntSetIntersectionFunction · 0.36
TestIntSetDifferenceFunction · 0.36
TestIntSetUnionFunction · 0.36
TestIntSetCopyFunction · 0.36
TestIntSetFuncMatchFunction · 0.36
TestIntSetApplyFuncFunction · 0.36
TestStringSetMsgpBinaryFunction · 0.36