listx

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(lst *list.List) bool

Empty list

func NotEmpty

func NotEmpty(lst *list.List) bool

NotEmpty list

Types

type Arraylist

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

Arraylist array lst

func New

func New(element ...any) *Arraylist

New an array list

func (*Arraylist) Add

func (lst *Arraylist) Add(element ...any)

Add element to array list

func (*Arraylist) Contains

func (lst *Arraylist) Contains(element any) (bool, int)

Contains element at array list or not

func (*Arraylist) Empty

func (lst *Arraylist) Empty() bool

Empty array list

func (*Arraylist) Get

func (lst *Arraylist) Get(index int) any

Get element from array list at index

func (*Arraylist) IndexOf

func (lst *Arraylist) IndexOf(element any) int

IndexOf element from array list

func (*Arraylist) Remove

func (lst *Arraylist) Remove(element any) bool

Remove from array list

func (*Arraylist) RemoveAtIndex

func (lst *Arraylist) RemoveAtIndex(index int) any

RemoveAtIndex from array list at index

func (*Arraylist) Size

func (lst *Arraylist) Size() int

Size of array list

type Listx

type Listx struct {
	list.List
}

Listx extend from list.List

func (*Listx) Empty

func (lst *Listx) Empty() bool

Empty list

func (*Listx) ForEach

func (lst *Listx) ForEach(fn func(any))

ForEach iterates over the list, calling fn on each element.

func (*Listx) NotEmpty

func (lst *Listx) NotEmpty() bool

NotEmpty list

Jump to

Keyboard shortcuts

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