Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadOnlySet ¶
type ReadOnlySet[T comparable] struct { // contains filtered or unexported fields }
ReadOnlySet is a read-only set.
func NewReadOnly ¶
func NewReadOnly[T comparable](values ...T) *ReadOnlySet[T]
NewReadOnly creates a new read-only set with the given values.
func (*ReadOnlySet[T]) Has ¶
func (s *ReadOnlySet[T]) Has(value T) bool
Has returns true if the set contains the given value.
func (*ReadOnlySet[T]) Len ¶
func (s *ReadOnlySet[T]) Len() int
Len returns the number of elements in the set.
func (*ReadOnlySet[T]) Values ¶
func (s *ReadOnlySet[T]) Values() []T
Values returns all the values in the set.
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
Set is a set.
func (*Set[T]) ReadOnly ¶
func (s *Set[T]) ReadOnly() *ReadOnlySet[T]
ReadOnly returns a read-only version of the set.
Click to show internal directories.
Click to hide internal directories.