FreeNOS
Public Member Functions | Data Fields
HashTable< K, V >::Bucket Class Reference

Describes a bucket in the HashTable, for collision avoidance. More...

#include <HashTable.h>

Public Member Functions

 Bucket ()
 Default constructor. More...
 
 Bucket (K k, V v)
 Constructor. More...
 
 Bucket (const Bucket &b)
 Copy constructor. More...
 
bool operator== (const Bucket &b) const
 Comparision operator. More...
 
bool operator!= (const Bucket &b) const
 Inequality operator. More...
 

Data Fields

key
 Key for this item. More...
 
value
 Value of the item. More...
 

Detailed Description

template<class K, class V>
class HashTable< K, V >::Bucket

Describes a bucket in the HashTable, for collision avoidance.

Definition at line 51 of file HashTable.h.

Constructor & Destructor Documentation

◆ Bucket() [1/3]

template<class K , class V >
HashTable< K, V >::Bucket::Bucket ( )
inline

Default constructor.

Definition at line 58 of file HashTable.h.

◆ Bucket() [2/3]

template<class K , class V >
HashTable< K, V >::Bucket::Bucket ( k,
v 
)
inline

Constructor.

Parameters
kK to use.
vV of the bucket.

Definition at line 68 of file HashTable.h.

◆ Bucket() [3/3]

template<class K , class V >
HashTable< K, V >::Bucket::Bucket ( const Bucket b)
inline

Copy constructor.

Definition at line 76 of file HashTable.h.

Member Function Documentation

◆ operator!=()

template<class K , class V >
bool HashTable< K, V >::Bucket::operator!= ( const Bucket b) const
inline

Inequality operator.

Definition at line 94 of file HashTable.h.

References HashTable< K, V >::Bucket::key, and HashTable< K, V >::Bucket::value.

◆ operator==()

template<class K , class V >
bool HashTable< K, V >::Bucket::operator== ( const Bucket b) const
inline

Comparision operator.

Parameters
bHashBucket instance to compare us with.

Definition at line 86 of file HashTable.h.

References HashTable< K, V >::Bucket::key, and HashTable< K, V >::Bucket::value.

Field Documentation

◆ key

template<class K , class V >
K HashTable< K, V >::Bucket::key

Key for this item.

Definition at line 100 of file HashTable.h.

Referenced by HashTable< K, V >::Bucket::operator!=(), and HashTable< K, V >::Bucket::operator==().

◆ value

template<class K , class V >
V HashTable< K, V >::Bucket::value

Value of the item.

Definition at line 103 of file HashTable.h.

Referenced by HashTable< K, V >::Bucket::operator!=(), and HashTable< K, V >::Bucket::operator==().


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