Documentation
¶
Index ¶
- type LinkedList
- func (d *LinkedList[T]) Append(element T) *LinkedList[T]
- func (d *LinkedList[T]) AppendLeft(element T) *LinkedList[T]
- func (d LinkedList[T]) At(index int) (value T, err error)
- func (d *LinkedList[T]) Clear() *LinkedList[T]
- func (d LinkedList[T]) Concat(another LinkedList[T]) LinkedList[T]
- func (d LinkedList[T]) Copy() LinkedList[T]
- func (d LinkedList[T]) Count(element T) (count int)
- func (d LinkedList[T]) Empty() bool
- func (d LinkedList[T]) Equal(another LinkedList[T]) bool
- func (d LinkedList[T]) Every(condition func(T) bool) bool
- func (d *LinkedList[T]) Extend(another *LinkedList[T]) *LinkedList[T]
- func (d *LinkedList[T]) ExtendLeft(another *LinkedList[T]) *LinkedList[T]
- func (d *LinkedList[T]) Fill(element T, area ...int) *LinkedList[T]
- func (d LinkedList[T]) Filter(condition func(T) bool) LinkedList[T]
- func (d LinkedList[T]) Find(by func(T) bool) (element T, found bool)
- func (d LinkedList[T]) FindIndex(by func(T) bool) (index int)
- func (l LinkedList[T]) FindIndexes(by func(T) bool, counts ...int) (indexes []int)
- func (d LinkedList[T]) FindLast(by func(T) bool) (element T, found bool)
- func (d LinkedList[T]) FindLastIndex(by func(T) bool) (index int)
- func (l LinkedList[T]) FindLastIndexes(by func(T) bool, counts ...int) (indexes []int)
- func (l LinkedList[T]) FindLasts(by func(T) bool, counts ...int) (elements []T)
- func (l LinkedList[T]) Finds(by func(T) bool, counts ...int) (elements []T)
- func (d *LinkedList[T]) ForEach(action func(T) T) *LinkedList[T]
- func (d LinkedList[T]) Head() (element T, err error)
- func (d LinkedList[T]) Includes(element T) bool
- func (d LinkedList[T]) IndexOf(element T) (index int)
- func (d *LinkedList[T]) Insert(index int, element T) *LinkedList[T]
- func (d LinkedList[T]) LastIndexOf(element T) (index int)
- func (d LinkedList[T]) Len() int
- func (d LinkedList[T]) Map(handler func(T) T) LinkedList[T]
- func (l LinkedList[T]) MarshalJSON() ([]byte, error)
- func (d *LinkedList[T]) Pop() (element T, err error)
- func (d *LinkedList[T]) PopLeft() (element T, err error)
- func (d LinkedList[T]) Reduce(handler func(T, T) T, initial ...T) (result T, err error)
- func (d LinkedList[T]) ReduceRight(handler func(T, T) T, initial ...T) (result T, err error)
- func (d *LinkedList[T]) Remove(element T, counts ...int) *LinkedList[T]
- func (d *LinkedList[T]) RemoveByIndex(index int) (element T, err error)
- func (d *LinkedList[T]) RemoveIf(condition func(T) bool, counts ...int) LinkedList[T]
- func (d *LinkedList[T]) RemoveRight(element T, counts ...int) *LinkedList[T]
- func (d *LinkedList[T]) RemoveRightIf(condition func(T) bool, counts ...int) LinkedList[T]
- func (d *LinkedList[T]) Replace(oldElement, newElement T, counts ...int) *LinkedList[T]
- func (d *LinkedList[T]) ReplaceIf(condition func(T) bool, newElement T, counts ...int) LinkedList[T]
- func (d *LinkedList[T]) ReplaceRight(oldElement, newElement T, counts ...int) *LinkedList[T]
- func (d *LinkedList[T]) ReplaceRightIf(condition func(T) bool, newElement T, counts ...int) LinkedList[T]
- func (d *LinkedList[T]) Reverse() *LinkedList[T]
- func (d *LinkedList[T]) Rotate(steps ...int) *LinkedList[T]
- func (d *LinkedList[T]) Set(index int, element T) (err error)
- func (d LinkedList[T]) Slice(args ...int) LinkedList[T]
- func (d LinkedList[T]) Some(condition func(T) bool) bool
- func (d *LinkedList[T]) Splice(start, deleteCount int, items ...T) LinkedList[T]
- func (l LinkedList[T]) String() string
- func (d LinkedList[T]) Tail() (element T, err error)
- func (d LinkedList[T]) ToArray() []T
- func (d LinkedList[T]) ToReversed() LinkedList[T]
- func (d LinkedList[T]) ToSpliced(start, deleteCount int, items ...T) LinkedList[T]
- func (l *LinkedList[T]) UnmarshalJSON(data []byte) (err error)
- func (d LinkedList[T]) With(index int, value T) LinkedList[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkedList ¶
type LinkedList[T any] struct { // contains filtered or unexported fields }
func NewLinkedList ¶
func NewLinkedList[T any](elements ...T) *LinkedList[T]
func (*LinkedList[T]) Append ¶
func (d *LinkedList[T]) Append(element T) *LinkedList[T]
func (*LinkedList[T]) AppendLeft ¶
func (d *LinkedList[T]) AppendLeft(element T) *LinkedList[T]
func (LinkedList[T]) At ¶
func (d LinkedList[T]) At(index int) (value T, err error)
func (*LinkedList[T]) Clear ¶
func (d *LinkedList[T]) Clear() *LinkedList[T]
func (LinkedList[T]) Concat ¶
func (d LinkedList[T]) Concat(another LinkedList[T]) LinkedList[T]
func (LinkedList[T]) Copy ¶
func (d LinkedList[T]) Copy() LinkedList[T]
func (LinkedList[T]) Count ¶
func (d LinkedList[T]) Count(element T) (count int)
func (LinkedList[T]) Empty ¶
func (d LinkedList[T]) Empty() bool
func (LinkedList[T]) Equal ¶
func (d LinkedList[T]) Equal(another LinkedList[T]) bool
func (LinkedList[T]) Every ¶
func (d LinkedList[T]) Every(condition func(T) bool) bool
func (*LinkedList[T]) Extend ¶
func (d *LinkedList[T]) Extend(another *LinkedList[T]) *LinkedList[T]
func (*LinkedList[T]) ExtendLeft ¶
func (d *LinkedList[T]) ExtendLeft(another *LinkedList[T]) *LinkedList[T]
func (*LinkedList[T]) Fill ¶
func (d *LinkedList[T]) Fill(element T, area ...int) *LinkedList[T]
func (LinkedList[T]) Filter ¶
func (d LinkedList[T]) Filter(condition func(T) bool) LinkedList[T]
func (LinkedList[T]) Find ¶
func (d LinkedList[T]) Find(by func(T) bool) (element T, found bool)
func (LinkedList[T]) FindIndex ¶
func (d LinkedList[T]) FindIndex(by func(T) bool) (index int)
func (LinkedList[T]) FindIndexes ¶
func (l LinkedList[T]) FindIndexes(by func(T) bool, counts ...int) (indexes []int)
func (LinkedList[T]) FindLast ¶
func (d LinkedList[T]) FindLast(by func(T) bool) (element T, found bool)
func (LinkedList[T]) FindLastIndex ¶
func (d LinkedList[T]) FindLastIndex(by func(T) bool) (index int)
func (LinkedList[T]) FindLastIndexes ¶
func (l LinkedList[T]) FindLastIndexes(by func(T) bool, counts ...int) (indexes []int)
func (LinkedList[T]) FindLasts ¶
func (l LinkedList[T]) FindLasts(by func(T) bool, counts ...int) (elements []T)
func (LinkedList[T]) Finds ¶
func (l LinkedList[T]) Finds(by func(T) bool, counts ...int) (elements []T)
func (*LinkedList[T]) ForEach ¶
func (d *LinkedList[T]) ForEach(action func(T) T) *LinkedList[T]
func (LinkedList[T]) Head ¶
func (d LinkedList[T]) Head() (element T, err error)
func (LinkedList[T]) Includes ¶
func (d LinkedList[T]) Includes(element T) bool
func (LinkedList[T]) IndexOf ¶
func (d LinkedList[T]) IndexOf(element T) (index int)
func (*LinkedList[T]) Insert ¶
func (d *LinkedList[T]) Insert(index int, element T) *LinkedList[T]
func (LinkedList[T]) LastIndexOf ¶
func (d LinkedList[T]) LastIndexOf(element T) (index int)
func (LinkedList[T]) Len ¶
func (d LinkedList[T]) Len() int
func (LinkedList[T]) Map ¶
func (d LinkedList[T]) Map(handler func(T) T) LinkedList[T]
func (LinkedList[T]) MarshalJSON ¶
func (l LinkedList[T]) MarshalJSON() ([]byte, error)
func (*LinkedList[T]) Pop ¶
func (d *LinkedList[T]) Pop() (element T, err error)
func (*LinkedList[T]) PopLeft ¶
func (d *LinkedList[T]) PopLeft() (element T, err error)
func (LinkedList[T]) Reduce ¶
func (d LinkedList[T]) Reduce(handler func(T, T) T, initial ...T) (result T, err error)
func (LinkedList[T]) ReduceRight ¶
func (d LinkedList[T]) ReduceRight(handler func(T, T) T, initial ...T) (result T, err error)
func (*LinkedList[T]) Remove ¶
func (d *LinkedList[T]) Remove(element T, counts ...int) *LinkedList[T]
func (*LinkedList[T]) RemoveByIndex ¶
func (d *LinkedList[T]) RemoveByIndex(index int) (element T, err error)
func (*LinkedList[T]) RemoveIf ¶
func (d *LinkedList[T]) RemoveIf(condition func(T) bool, counts ...int) LinkedList[T]
func (*LinkedList[T]) RemoveRight ¶
func (d *LinkedList[T]) RemoveRight(element T, counts ...int) *LinkedList[T]
func (*LinkedList[T]) RemoveRightIf ¶
func (d *LinkedList[T]) RemoveRightIf(condition func(T) bool, counts ...int) LinkedList[T]
func (*LinkedList[T]) Replace ¶
func (d *LinkedList[T]) Replace(oldElement, newElement T, counts ...int) *LinkedList[T]
func (*LinkedList[T]) ReplaceIf ¶
func (d *LinkedList[T]) ReplaceIf(condition func(T) bool, newElement T, counts ...int) LinkedList[T]
func (*LinkedList[T]) ReplaceRight ¶
func (d *LinkedList[T]) ReplaceRight(oldElement, newElement T, counts ...int) *LinkedList[T]
func (*LinkedList[T]) ReplaceRightIf ¶
func (d *LinkedList[T]) ReplaceRightIf(condition func(T) bool, newElement T, counts ...int) LinkedList[T]
func (*LinkedList[T]) Reverse ¶
func (d *LinkedList[T]) Reverse() *LinkedList[T]
func (*LinkedList[T]) Rotate ¶
func (d *LinkedList[T]) Rotate(steps ...int) *LinkedList[T]
func (*LinkedList[T]) Set ¶
func (d *LinkedList[T]) Set(index int, element T) (err error)
func (LinkedList[T]) Slice ¶
func (d LinkedList[T]) Slice(args ...int) LinkedList[T]
func (LinkedList[T]) Some ¶
func (d LinkedList[T]) Some(condition func(T) bool) bool
func (*LinkedList[T]) Splice ¶
func (d *LinkedList[T]) Splice(start, deleteCount int, items ...T) LinkedList[T]
func (LinkedList[T]) String ¶
func (l LinkedList[T]) String() string
func (LinkedList[T]) Tail ¶
func (d LinkedList[T]) Tail() (element T, err error)
func (LinkedList[T]) ToArray ¶
func (d LinkedList[T]) ToArray() []T
func (LinkedList[T]) ToReversed ¶
func (d LinkedList[T]) ToReversed() LinkedList[T]
func (LinkedList[T]) ToSpliced ¶
func (d LinkedList[T]) ToSpliced(start, deleteCount int, items ...T) LinkedList[T]
func (*LinkedList[T]) UnmarshalJSON ¶
func (l *LinkedList[T]) UnmarshalJSON(data []byte) (err error)
func (LinkedList[T]) With ¶
func (d LinkedList[T]) With(index int, value T) LinkedList[T]
Click to show internal directories.
Click to hide internal directories.