collections

package
v0.0.0-...-0fa378f Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayList

type ArrayList struct {
	MutableCollection
	// contains filtered or unexported fields
}

func NewArrayList

func NewArrayList() *ArrayList

func (*ArrayList) Add

func (self *ArrayList) Add(item interface{})

func (*ArrayList) At

func (self *ArrayList) At(index int) interface{}

func (*ArrayList) Iterator

func (self *ArrayList) Iterator() Iterator

func (*ArrayList) Size

func (self *ArrayList) Size() int

type Collection

type Collection interface {
	Iterable
	Size() int
}

type HasKey

type HasKey interface {
	GetKey() string
}

type HasOwner

type HasOwner interface {
	GetOwner() string
}

type InMemoryPool

type InMemoryPool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool() *InMemoryPool

func (*InMemoryPool) Add

func (self *InMemoryPool) Add(element interface{})

func (*InMemoryPool) Borrow

func (self *InMemoryPool) Borrow(owner string) Pooled

func (*InMemoryPool) Return

func (self *InMemoryPool) Return(pooled Pooled)

type Iterable

type Iterable interface {
	Iterator() Iterator
}

type Iterator

type Iterator interface {
	Next() interface{}
	HasNext() bool
}

type MutableCollection

type MutableCollection interface {
	Collection
	Add(item interface{})
}

type Pool

type Pool interface {
	Borrow(owner string) Pooled
	Return(pooled Pooled)
}

type PoolEntry

type PoolEntry struct {
	// contains filtered or unexported fields
}

func (*PoolEntry) Close

func (self *PoolEntry) Close() error

func (*PoolEntry) ReturnToPool

func (self *PoolEntry) ReturnToPool()

func (*PoolEntry) Value

func (self *PoolEntry) Value() interface{}

type Pooled

type Pooled interface {
	io.Closer

	ReturnToPool()
	Value() interface{}
}

func NewPooled

func NewPooled(pool Pool, borrowed interface{}) Pooled

type Sequence

type Sequence interface {
	Collection

	At(index int) interface{}
}

func AsSequence

func AsSequence(items ...interface{}) Sequence

func FromSlice

func FromSlice(slice interface{}) Sequence

type SequenceIterator

type SequenceIterator struct {
	// contains filtered or unexported fields
}

func NewSequenceIterator

func NewSequenceIterator(seq Sequence) SequenceIterator

func (*SequenceIterator) HasNext

func (self *SequenceIterator) HasNext() bool

func (*SequenceIterator) Next

func (self *SequenceIterator) Next() interface{}

type SliceSequence

type SliceSequence struct {
	// contains filtered or unexported fields
}

func NewSliceSequence

func NewSliceSequence(items []interface{}) SliceSequence

func (SliceSequence) At

func (self SliceSequence) At(index int) interface{}

func (SliceSequence) Iterator

func (self SliceSequence) Iterator() Iterator

func (SliceSequence) Size

func (self SliceSequence) Size() int

type StringIterator

type StringIterator interface {
	Iterator

	NextString() string
}

Jump to

Keyboard shortcuts

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