Documentation ¶
Index ¶
- type LRU
- func (lm *LRU) Clear()
- func (lm *LRU) Empty() bool
- func (lm *LRU) Get(key interface{}) (value interface{}, found bool)
- func (lm *LRU) GetMaxSize() int
- func (lm *LRU) Iterator() linkedhashmap.Iterator
- func (lm *LRU) Keys() []interface{}
- func (lm *LRU) Newest() (key interface{}, found bool)
- func (lm *LRU) Oldest() (key interface{}, found bool)
- func (lm *LRU) Put(key interface{}, value interface{})
- func (lm *LRU) Remove(key interface{})
- func (lm *LRU) SetMaxSize(s int)
- func (lm *LRU) Size() int
- func (lm *LRU) String() string
- func (lm *LRU) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
func (*LRU) Get ¶
Get searches the element in the map by key and returns its value or nil if key is not found in tree. Second return parameter is true if key was found, otherwise false. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*LRU) Put ¶
func (lm *LRU) Put(key interface{}, value interface{})
Put inserts key-value pair into the map. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*LRU) Remove ¶
func (lm *LRU) Remove(key interface{})
Remove removes the element from the map by key. Key should adhere to the comparator's type assertion, otherwise method panics.
Click to show internal directories.
Click to hide internal directories.