list

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package list provides a built-in implementation of a generic list

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T0

type T0 string

type T0LessFunc

type T0LessFunc func(first, second T0) bool

type T0List

type T0List interface {
	Filter(f T0Predicate) T0List
	IFilter(f T0Predicate) <-chan T0
	Iter() <-chan T0
	Each(visitor T0Visitor) T0List
	Get(i int) T0
	Any(f T0Predicate) bool
	All(f T0Predicate) bool
	FindFirst(f T0Predicate, defaultVal T0) T0
	FindLast(f T0Predicate, defaultVal T0) T0
	Len() int
	Swap(i, j int)
	Sort(byFunc T0LessFunc) T0List
	Clone() T0List
	Set(i int, val T0)
	Append(items ...T0)
	Prepend(items ...T0)
	Pop(defaultVal T0) T0
}

func NewSyncronizedT0List

func NewSyncronizedT0List(items ...T0) T0List

func NewT0List

func NewT0List() T0List

func NewT0ListFromSlice

func NewT0ListFromSlice(items ...T0) T0List

type T0ListSorter

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

func (T0ListSorter) All

func (l T0ListSorter) All(f T0Predicate) bool

func (T0ListSorter) Any

func (l T0ListSorter) Any(f T0Predicate) bool

func (T0ListSorter) Append

func (l T0ListSorter) Append(items ...T0)

func (T0ListSorter) Clone

func (l T0ListSorter) Clone() T0List

func (T0ListSorter) Each

func (l T0ListSorter) Each(visitor T0Visitor) T0List

func (T0ListSorter) Filter

func (l T0ListSorter) Filter(f T0Predicate) T0List

func (T0ListSorter) FindFirst

func (l T0ListSorter) FindFirst(f T0Predicate, defaultVal T0) T0

func (T0ListSorter) FindLast

func (l T0ListSorter) FindLast(f T0Predicate, defaultVal T0) T0

func (T0ListSorter) Get

func (l T0ListSorter) Get(i int) T0

func (T0ListSorter) IFilter

func (l T0ListSorter) IFilter(f T0Predicate) <-chan T0

func (T0ListSorter) Iter

func (l T0ListSorter) Iter() <-chan T0

func (T0ListSorter) Len

func (l T0ListSorter) Len() int

func (*T0ListSorter) Less

func (s *T0ListSorter) Less(i, j int) bool

func (T0ListSorter) Pop

func (l T0ListSorter) Pop(defaultVal T0) T0

func (T0ListSorter) Prepend

func (l T0ListSorter) Prepend(items ...T0)

func (T0ListSorter) Set

func (l T0ListSorter) Set(i int, val T0)

func (T0ListSorter) Sort

func (l T0ListSorter) Sort(byFunc T0LessFunc) T0List

func (T0ListSorter) Swap

func (l T0ListSorter) Swap(i, j int)

type T0Predicate

type T0Predicate func(T0) bool

type T0Visitor

type T0Visitor func(i int, val T0) bool

Jump to

Keyboard shortcuts

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