Documentation ¶
Index ¶
- type Array
- func (a *Array) At(pos int) interface{}
- func (a *Array) Back() interface{}
- func (a *Array) Begin() *ArrayIterator
- func (a *Array) Data() []interface{}
- func (a *Array) Empty() bool
- func (a *Array) End() *ArrayIterator
- func (a *Array) Fill(val interface{})
- func (a *Array) First() *ArrayIterator
- func (a *Array) Front() interface{}
- func (a *Array) IterAt(pos int) *ArrayIterator
- func (a *Array) Last() *ArrayIterator
- func (a *Array) Set(pos int, val interface{})
- func (a *Array) Size() int
- func (a *Array) String() string
- func (a *Array) SwapArray(other *Array)
- type ArrayIterator
- func (iter *ArrayIterator) Clone() iterator.ConstIterator
- func (iter *ArrayIterator) Equal(other iterator.ConstIterator) bool
- func (iter *ArrayIterator) IsValid() bool
- func (iter *ArrayIterator) IteratorAt(pos int) iterator.RandomAccessIterator
- func (iter *ArrayIterator) Next() iterator.ConstIterator
- func (iter *ArrayIterator) Position() int
- func (iter *ArrayIterator) Prev() iterator.ConstBidIterator
- func (iter *ArrayIterator) SetValue(val interface{})
- func (iter *ArrayIterator) Value() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array is a fixed size slice
func NewFromArray ¶
NewFromArray creates a new array from another array, and copy its values
func (*Array) Begin ¶
func (a *Array) Begin() *ArrayIterator
Begin returns an iterator of the array with the first position
func (*Array) Data ¶
func (a *Array) Data() []interface{}
Data returns the internal values of the array
func (*Array) End ¶
func (a *Array) End() *ArrayIterator
End returns an iterator of the array with the position a.Size()
func (*Array) First ¶
func (a *Array) First() *ArrayIterator
First returns an iterator of the array with the first position
func (*Array) Front ¶
func (a *Array) Front() interface{}
Front returns the first value in the array
func (*Array) IterAt ¶
func (a *Array) IterAt(pos int) *ArrayIterator
IterAt returns an iterator of the array with position pos
func (*Array) Last ¶
func (a *Array) Last() *ArrayIterator
Last returns an iterator of the array with the last position
type ArrayIterator ¶
type ArrayIterator struct {
// contains filtered or unexported fields
}
ArrayIterator is an an implementation of Array iterator
func (*ArrayIterator) Clone ¶
func (iter *ArrayIterator) Clone() iterator.ConstIterator
Clone clones the iterator to a new iterator
func (*ArrayIterator) Equal ¶
func (iter *ArrayIterator) Equal(other iterator.ConstIterator) bool
Equal returns true if the iterator is equal to the passed iterator, otherwise returns false
func (*ArrayIterator) IsValid ¶
func (iter *ArrayIterator) IsValid() bool
IsValid returns true if the iterator is valid, otherwise returns false
func (*ArrayIterator) IteratorAt ¶
func (iter *ArrayIterator) IteratorAt(pos int) iterator.RandomAccessIterator
IteratorAt creates a new iterator with position pos
func (*ArrayIterator) Next ¶
func (iter *ArrayIterator) Next() iterator.ConstIterator
Next moves the position of iterator to the next position and returns itself
func (*ArrayIterator) Position ¶
func (iter *ArrayIterator) Position() int
Position returns the position of the iterator
func (*ArrayIterator) Prev ¶
func (iter *ArrayIterator) Prev() iterator.ConstBidIterator
Prev moves the position of iterator to the previous position and returns itself
func (*ArrayIterator) SetValue ¶
func (iter *ArrayIterator) SetValue(val interface{})
SetValue sets the value of the array at the position of the iterator point to
func (*ArrayIterator) Value ¶
func (iter *ArrayIterator) Value() interface{}
Value returns the value of array at the position of the iterator point to