stdlib

package
v0.0.0-...-7b96089 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectChildrenListIterator

func NewDirectChildrenListIterator[T psi.Node](c *NodeCollection[T]) iterators.Iterator[T]

Types

type Collection

type Collection[T any] interface {
	iterators.Iterable[T]

	Add(value T) int
	Get(index int) T
	InsertAt(index int, value T)
	Remove(value T) bool
	RemoveAt(index int) T
	IndexOf(value T) int
	Contains(value T) bool
	Len() int
}

type List

type List[T any] interface {
	Collection[T]
}

type NodeCollection

type NodeCollection[T psi.Node] struct {
	psi.NodeBase
}

func (*NodeCollection[T]) Add

func (c *NodeCollection[T]) Add(value T) int

func (*NodeCollection[T]) Contains

func (c *NodeCollection[T]) Contains(value T) bool

func (*NodeCollection[T]) Get

func (c *NodeCollection[T]) Get(index int) T

func (*NodeCollection[T]) IndexOf

func (c *NodeCollection[T]) IndexOf(value T) int

func (*NodeCollection[T]) InsertAt

func (c *NodeCollection[T]) InsertAt(index int, value T)

func (*NodeCollection[T]) Iterator

func (c *NodeCollection[T]) Iterator() iterators.Iterator[T]

func (*NodeCollection[T]) Length

func (c *NodeCollection[T]) Length() int

func (*NodeCollection[T]) Remove

func (c *NodeCollection[T]) Remove(value T) bool

func (*NodeCollection[T]) RemoveAt

func (c *NodeCollection[T]) RemoveAt(index int) T

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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