Documentation ¶
Index ¶
- type MapIterator
- type MapSetIterator
- type SliceWrap
- func (s *SliceWrap[V]) Add(value V) bool
- func (s *SliceWrap[V]) AddAll(other structs.Collection[V]) bool
- func (s *SliceWrap[V]) AddIterator(iter structs.Iterator[V]) bool
- func (s *SliceWrap[V]) Clear()
- func (s *SliceWrap[V]) Contains(value V) bool
- func (s *SliceWrap[V]) ContainsAll(other structs.Collection[V]) bool
- func (s *SliceWrap[V]) IsEmpty() bool
- func (s *SliceWrap[V]) Iterator() structs.Iterator[V]
- func (s *SliceWrap[V]) Remove(value V) bool
- func (s *SliceWrap[V]) RemoveAll(other structs.Collection[V]) bool
- func (s *SliceWrap[V]) RemoveIterator(iter structs.Iterator[V]) bool
- func (s *SliceWrap[V]) RetainAll(other structs.Collection[V]) bool
- func (s *SliceWrap[V]) Size() int
- func (s *SliceWrap[V]) Values() []V
- type SliceWrapIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapIterator ¶
type MapIterator[K comparable, V any] struct { // contains filtered or unexported fields }
func Map ¶
func Map[K comparable, V any](m map[K]V) *MapIterator[K, V]
func (*MapIterator[K, V]) HasNext ¶
func (i *MapIterator[K, V]) HasNext() bool
func (*MapIterator[K, V]) Next ¶
func (i *MapIterator[K, V]) Next() (K, V)
func (*MapIterator[K, V]) Remove ¶
func (i *MapIterator[K, V]) Remove()
type MapSetIterator ¶
type MapSetIterator[V comparable] struct { // contains filtered or unexported fields }
func MapSet ¶
func MapSet[V comparable](m map[V]struct{}) *MapSetIterator[V]
func (*MapSetIterator[V]) HasNext ¶
func (i *MapSetIterator[V]) HasNext() bool
func (*MapSetIterator[V]) Next ¶
func (i *MapSetIterator[V]) Next() V
func (*MapSetIterator[V]) Remove ¶
func (i *MapSetIterator[V]) Remove()
type SliceWrap ¶
type SliceWrap[V any] struct { // contains filtered or unexported fields }
SliceWrap is a read-only wrapper around a slice, used in cases where you want to use it as a structs.Collection. Attempting to mutate the collection will result in a panic.
func OrderedSlice ¶
func OrderedSlice[V constraints.Ordered](s []V) *SliceWrap[V]
func OrderedValues ¶
func OrderedValues[V constraints.Ordered](values ...V) *SliceWrap[V]
func (*SliceWrap[V]) AddIterator ¶
func (*SliceWrap[V]) ContainsAll ¶
func (s *SliceWrap[V]) ContainsAll(other structs.Collection[V]) bool
func (*SliceWrap[V]) RemoveIterator ¶
type SliceWrapIterator ¶
type SliceWrapIterator[V any] struct { // contains filtered or unexported fields }
func SliceIterator ¶
func SliceIterator[V any](s []V) *SliceWrapIterator[V]
func ValueIterator ¶
func ValueIterator[V any](values ...V) *SliceWrapIterator[V]
func (*SliceWrapIterator[V]) HasNext ¶
func (s *SliceWrapIterator[V]) HasNext() bool
func (*SliceWrapIterator[V]) Next ¶
func (s *SliceWrapIterator[V]) Next() V
func (*SliceWrapIterator[V]) Remove ¶
func (s *SliceWrapIterator[V]) Remove()
Click to show internal directories.
Click to hide internal directories.