mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
update
This commit is contained in:
@ -27,7 +27,7 @@ func NewHashSet[T constraints.Ordered](values ...T) *hash_set[T] {
|
||||
return &set
|
||||
}
|
||||
|
||||
func (s *hash_set[T]) WithSync() *hash_set[T] {
|
||||
func (s *hash_set[T]) Sync() *hash_set[T] {
|
||||
s.lock = locker.NewRWLocker()
|
||||
return s
|
||||
}
|
||||
@ -99,6 +99,10 @@ func (s hash_set[T]) copyToSorted() Set[T] {
|
||||
return orderd
|
||||
}
|
||||
|
||||
func (s *hash_set[T]) Shrink() *hash_set[T] {
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *hash_set[T]) Clone() *hash_set[T] {
|
||||
set := NewHashSet[T]()
|
||||
set.Add(s.ToSlice()...)
|
||||
|
Reference in New Issue
Block a user