list

package
v1.5.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentSets

type ConcurrentSets struct {
	// contains filtered or unexported fields
}

func (*ConcurrentSets) Exists

func (r *ConcurrentSets) Exists(t string) (ok bool)

func (*ConcurrentSets) ExistsAll

func (r *ConcurrentSets) ExistsAll(t ...string) (ok bool)

func (*ConcurrentSets) ExistsAny

func (r *ConcurrentSets) ExistsAny(t ...string) (ok bool)

func (*ConcurrentSets) ForEach

func (r *ConcurrentSets) ForEach(accept func(key string))

func (*ConcurrentSets) Length

func (r *ConcurrentSets) Length() int

func (*ConcurrentSets) Put

func (r *ConcurrentSets) Put(s string)

func (*ConcurrentSets) PutAll

func (r *ConcurrentSets) PutAll(arr ...string)

func (*ConcurrentSets) Remove

func (r *ConcurrentSets) Remove(s string)

func (*ConcurrentSets) RemoveAll

func (r *ConcurrentSets) RemoveAll(arr ...string)

func (*ConcurrentSets) ToArray

func (r *ConcurrentSets) ToArray() (arr []string)

type GenericSet added in v1.1.0

type GenericSet[T any] interface {
	Put(s T)
	PutAll(arr ...T)
	ToArray() (arr []T)
	Exists(t T) (ok bool)
	ExistsAny(t ...T) (ok bool)
	ExistsAll(t ...T) (ok bool)
	Remove(s T)
	RemoveAll(arr ...T)
	Length() int
	ForEach(accept func(key T))
}

func NewGenericConcurrentSets added in v1.1.0

func NewGenericConcurrentSets[T any](arr ...T) (s GenericSet[T])

func NewGenericSets added in v1.1.0

func NewGenericSets[T comparable](arr ...T) GenericSet[T]

type List

type List struct {
	// contains filtered or unexported fields
}

func NewList

func NewList(slice interface{}) *List

func (*List) Contains

func (r *List) Contains(o interface{}) (ok bool)

func (*List) Find

func (r *List) Find(o interface{}) (int, bool)

func (*List) FindBy

func (r *List) FindBy(accept func(i int) bool) (j int, ok bool)

func (*List) ForEach

func (r *List) ForEach(accept func(i int))

func (*List) ForEachWithStop

func (r *List) ForEachWithStop(accept func(i int) bool)

func (*List) Len

func (r *List) Len() int

type Set

type Set interface {
	Put(s string)
	PutAll(arr ...string)
	ToArray() (arr []string)
	Exists(t string) (ok bool)
	ExistsAny(t ...string) (ok bool)
	ExistsAll(t ...string) (ok bool)
	Remove(s string)
	RemoveAll(arr ...string)
	Length() int
	ForEach(accept func(key string))
}

func NewConcurrentSets

func NewConcurrentSets(arr ...string) (s Set)

func NewSets

func NewSets(arr ...string) (s Set)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL