Documentation ¶
Index ¶
- type LinkedList
- func (l *LinkedList[T]) Add(t ...T) error
- func (l *LinkedList[T]) AddAt(t T, index int) error
- func (l *LinkedList[T]) Clear()
- func (l *LinkedList[T]) Get(index int) (T, error)
- func (l *LinkedList[T]) IsEmpty() bool
- func (l *LinkedList[T]) Iter(yield func(int, T) bool)
- func (l *LinkedList[T]) Peek() (T, error)
- func (l *LinkedList[T]) Poll() (T, error)
- func (l *LinkedList[T]) Remove(index int) (T, error)
- func (l *LinkedList[T]) RemoveValue(t T) int
- func (l *LinkedList[T]) Shift(t T) error
- func (l *LinkedList[T]) Size() int
- func (l *LinkedList[T]) Stream() *stream.Stream[T]
- func (l *LinkedList[T]) ToArray() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkedList ¶
type LinkedList[T comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable]() LinkedList[T]
func (*LinkedList[T]) Add ¶
func (l *LinkedList[T]) Add(t ...T) error
func (*LinkedList[T]) AddAt ¶ added in v1.0.8
func (l *LinkedList[T]) AddAt(t T, index int) error
func (*LinkedList[T]) Clear ¶
func (l *LinkedList[T]) Clear()
func (*LinkedList[T]) Get ¶
func (l *LinkedList[T]) Get(index int) (T, error)
func (*LinkedList[T]) IsEmpty ¶
func (l *LinkedList[T]) IsEmpty() bool
func (*LinkedList[T]) Iter ¶ added in v1.0.8
func (l *LinkedList[T]) Iter(yield func(int, T) bool)
func (*LinkedList[T]) Peek ¶
func (l *LinkedList[T]) Peek() (T, error)
func (*LinkedList[T]) Poll ¶ added in v1.0.8
func (l *LinkedList[T]) Poll() (T, error)
func (*LinkedList[T]) Remove ¶
func (l *LinkedList[T]) Remove(index int) (T, error)
func (*LinkedList[T]) RemoveValue ¶
func (l *LinkedList[T]) RemoveValue(t T) int
func (*LinkedList[T]) Shift ¶ added in v1.0.8
func (l *LinkedList[T]) Shift(t T) error
func (*LinkedList[T]) Size ¶
func (l *LinkedList[T]) Size() int
func (*LinkedList[T]) Stream ¶
func (l *LinkedList[T]) Stream() *stream.Stream[T]
func (*LinkedList[T]) ToArray ¶
func (l *LinkedList[T]) ToArray() []T
Click to show internal directories.
Click to hide internal directories.