ListLike

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrEmptyList

type ErrEmptyList[T any] struct {
	// contains filtered or unexported fields
}

func NewErrEmptyList

func NewErrEmptyList[T any](list ListLike[T]) *ErrEmptyList[T]

func (*ErrEmptyList[T]) Error

func (e *ErrEmptyList[T]) Error() string

type ErrFullList

type ErrFullList[T any] struct {
	// contains filtered or unexported fields
}

func NewErrFullList

func NewErrFullList[T any](list ListLike[T]) *ErrFullList[T]

func (*ErrFullList[T]) Error

func (e *ErrFullList[T]) Error() string

type ListLike

type ListLike[T any] interface {
	// The IsEmpty method checks if the list is empty and returns a boolean value
	// indicating whether it is empty or not.
	IsEmpty() bool

	// The Size method returns the number of elements currently in the list.
	Size() int

	// The Clear method is used to remove all elements from the list, making it empty.
	Clear()

	// The String method returns a string representation of the list.
	// It is useful for debugging and logging purposes.
	fmt.Stringer

	// CutNilValues is a method that removes all nil values from the list.
	// It is useful for cleaning up the list and removing any empty or nil elements.
	CutNilValues()

	// The itf.Iterable interface is used to provide an iterator for the list.
	itf.Iterable[T]

	// The itf.Slicer interface is used to provide a slicer for the list.
	itf.Slicer[T]

	// The itf.Copier interface is used to provide a method for copying the list.
	itf.Copier
}

Directories

Path Synopsis
Package ListLike provides a Lister interface that defines methods for a list data structure.
Package ListLike provides a Lister interface that defines methods for a list data structure.
Package ListLike provides a Queuer interface that defines methods for a queue data structure.
Package ListLike provides a Queuer interface that defines methods for a queue data structure.
Package ListLike provides a Stacker interface that defines methods for a stack data structure.
Package ListLike provides a Stacker interface that defines methods for a stack data structure.
Package ListLike provides a Lister interface that defines methods for a list data structure.
Package ListLike provides a Lister interface that defines methods for a list data structure.
Package ListLike provides a Queuer interface that defines methods for a queue data structure.
Package ListLike provides a Queuer interface that defines methods for a queue data structure.
Package ListLike provides a Stacker interface that defines methods for a stack data structure.
Package ListLike provides a Stacker interface that defines methods for a stack data structure.

Jump to

Keyboard shortcuts

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