Documentation ¶
Index ¶
- Constants
- type IVector
- type Iterator
- type Vector
- func (v *Vector) Back() interface{}
- func (v *Vector) Clear()
- func (v *Vector) Empty() bool
- func (v *Vector) Erase(index int)
- func (v *Vector) Front() interface{}
- func (v *Vector) Get(index int) interface{}
- func (v *Vector) Iterator() Iterator
- func (v *Vector) Len() int
- func (v *Vector) Less(i, j int) bool
- func (v *Vector) PopBack()
- func (v *Vector) PopFront()
- func (v *Vector) PushBack(value interface{})
- func (v *Vector) PushFront(value interface{})
- func (v *Vector) Size() int
- func (v *Vector) Swap(i, j int)
- func (v *Vector) Values() []interface{}
Constants ¶
const (
VectorBlockSize = 16
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator holding the iterator's state
func (*Iterator) Begin ¶
func (v *Iterator) Begin()
Begin resets the iterator to its initial state (one-before-first) Call Next() to fetch the first element if any.
func (*Iterator) End ¶
func (v *Iterator) End()
End moves the iterator past the last element (one-past-the-end). Call Prev() to fetch the last element if any.
func (*Iterator) First ¶
First moves the iterator to the first element and returns true if there was a first element in the container. If First() returns true, then first element's index and value can be retrieved by Index() and Value(). Modifies the state of the iterator.
func (*Iterator) Index ¶
Index returns the current element's index. Does not modify the state of the iterator.
func (*Iterator) Last ¶
Last moves the iterator to the last element and returns true if there was a last element in the container. If Last() returns true, then last element's index and value can be retrieved by Index() and Value(). Modifies the state of the iterator.
func (*Iterator) Next ¶
Next moves the iterator to the next element and returns true if there was a next element in the container. If Next() returns true, then next element's index and value can be retrieved by Index() and Value(). If Next() was called for the first time, then it will point the iterator to the first element if it exists. Modifies the state of the iterator.