Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sequence ¶
type Sequence[T any] interface { // GetPrefixes returns the prefixes of the sequence. GetPreffixes() []Sequence[T] // GetSuffixes returns the suffixes of the sequence. GetSuffixes() []Sequence[T] // Append appends the specified symbol(s) to a copy of the sequence and returns it. Append(symbols ...Symbol[T]) Sequence[T] // Prepend prepends the specified symbol(s) to a copy of the sequence and returns it. Prepend(symbols ...Symbol[T]) Sequence[T] // Length returns the length of the sequence. Length() int // IsEmpty returns true if the sequence is empty, false otherwise. IsEmpty() bool // GetSymbolAt returns the symbol at the specified index. GetSymbolAt(index int) Symbol[T] //AsSlice returns the sequence as a slice. AsSlice() []Symbol[T] String() string Equal(other Sequence[T]) bool Iterator() iterator.Iterator[Symbol[T]] Hash() int }
type Symbol ¶
type Symbol[T any] interface { // GetValue returns the value of the symbol. GetValue() T // AddToValue adds the given value to the symbol's value. AddToValue(value T) Symbol[T] String() string Equal(other Symbol[T]) bool LesserThan(other Symbol[T]) bool GreaterThan(other Symbol[T]) bool LesserEqualThan(other Symbol[T]) bool GreaterEqualThan(other Symbol[T]) bool Hash() int }
Click to show internal directories.
Click to hide internal directories.