Apache Mesos
Public Types | Public Member Functions | List of all members
BoundedHashMap< Key, Value > Class Template Reference

#include <boundedhashmap.hpp>

Public Types

typedef std::pair< Key, Value > entry
 
typedef std::list< entrylist
 
typedef hashmap< Key, typename list::iterator > map
 

Public Member Functions

 BoundedHashMap (size_t capacity)
 
void set (const Key &key, const Value &value)
 
Option< Value > get (const Key &key) const
 
Value & at (const Key &key)
 
const Value & at (const Key &key) const
 
bool contains (const Key &key) const
 
size_t erase (const Key &key)
 
std::list< Key > keys () const
 
std::list< Value > values () const
 
size_t size () const
 
bool empty () const
 
void clear ()
 
list::iterator begin ()
 
list::iterator end ()
 
list::const_iterator begin () const
 
list::const_iterator end () const
 

Member Typedef Documentation

template<typename Key, typename Value>
typedef std::pair<Key, Value> BoundedHashMap< Key, Value >::entry
template<typename Key, typename Value>
typedef std::list<entry> BoundedHashMap< Key, Value >::list
template<typename Key, typename Value>
typedef hashmap<Key, typename list::iterator> BoundedHashMap< Key, Value >::map

Constructor & Destructor Documentation

template<typename Key, typename Value>
BoundedHashMap< Key, Value >::BoundedHashMap ( size_t  capacity)
inline

Member Function Documentation

template<typename Key, typename Value>
Value& BoundedHashMap< Key, Value >::at ( const Key &  key)
inline
template<typename Key, typename Value>
const Value& BoundedHashMap< Key, Value >::at ( const Key &  key) const
inline
template<typename Key, typename Value>
list::iterator BoundedHashMap< Key, Value >::begin ( )
inline
template<typename Key, typename Value>
list::const_iterator BoundedHashMap< Key, Value >::begin ( ) const
inline
template<typename Key, typename Value>
void BoundedHashMap< Key, Value >::clear ( )
inline
template<typename Key, typename Value>
bool BoundedHashMap< Key, Value >::contains ( const Key &  key) const
inline
template<typename Key, typename Value>
bool BoundedHashMap< Key, Value >::empty ( ) const
inline
template<typename Key, typename Value>
list::iterator BoundedHashMap< Key, Value >::end ( )
inline
template<typename Key, typename Value>
list::const_iterator BoundedHashMap< Key, Value >::end ( ) const
inline
template<typename Key, typename Value>
size_t BoundedHashMap< Key, Value >::erase ( const Key &  key)
inline
template<typename Key, typename Value>
Option<Value> BoundedHashMap< Key, Value >::get ( const Key &  key) const
inline
template<typename Key, typename Value>
std::list<Key> BoundedHashMap< Key, Value >::keys ( ) const
inline
template<typename Key, typename Value>
void BoundedHashMap< Key, Value >::set ( const Key &  key,
const Value &  value 
)
inline
template<typename Key, typename Value>
size_t BoundedHashMap< Key, Value >::size ( ) const
inline
template<typename Key, typename Value>
std::list<Value> BoundedHashMap< Key, Value >::values ( ) const
inline

The documentation for this class was generated from the following file: