2005/5/9

     
 

class TTreeMap

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::util::TTreeMap< K, V > Class Template Reference

#include <TTreeMap.h>

Inheritance diagram for acdk::util::TTreeMap< K, V >:

acdk::util::TAbstractMap< K, V > acdk::util::TSortedMap< K, V > acdk::lang::Cloneable acdk::io::Serializable acdk::lang::Object acdk::util::TMap< K, V > acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

template<class K, class V>
class acdk::util::TTreeMap< K, V >

A TreeMap organized as Red-Black tree.

Requirements to the acdk::lang::Object types to store:


Public Types

typedef K RKeyType
typedef V RValueType
typedef TTreeMap< RKeyType,
RValueType
ThisType
typedef RefHolder< ThisTypeRThisType
typedef RThisType RefType
typedef TAbstractMap< RKeyType,
RValueType
SuperType
typedef ThisType TreeMapType
typedef RThisType RTreeMapType
typedef TRedBlackNode< RKeyType,
RValueType
RedBlackNodeType
typedef RedBlackNodeType::RefType RRedBlackNodeType
typedef SuperType::MapEntrySetType MapEntrySetType
typedef MapEntrySetType::RefType RMapEntrySetType
typedef TMap< RKeyType, RValueTypeMapType
typedef MapType::RefType RMapType
typedef TSortedMap< RKeyType,
RValueType
SortedMapType
typedef SortedMapType::RefType RSortedMapType
typedef MapType::MapEntryType MapEntryType
typedef MapEntryType::RefType RMapEntryType
typedef SuperType::KeySetType KeySetType
typedef KeySetType::RefType RKeySetType
typedef TTreeMapKeySet< RKeyType,
RValueType
TreeMapKeySetType
typedef TSubTreeMap< RKeyType,
RValueType
SubTreeMapType
typedef MapType::ValueCollectionType ValueCollectionType
typedef ValueCollectionType::RefType RValueCollectionType
typedef SortedMapType::ComparatorType ComparatorType
typedef ComparatorType::RefType RComparatorType

Public Member Functions

 TTreeMap (IN(RMapType) map=Nil, IN(RComparatorType) comp=Nil)
 ~TTreeMap ()
virtual void clear ()
virtual acdk::lang::Object clone ()
virtual acdk::lang::Object clone (sys::Allocator *alc)
virtual RComparatorType comparator ()
virtual bool containsKey (IN(RKeyType) key)
virtual bool containsValue (IN(RValueType) val)
virtual RMapEntrySetType entrySet ()
virtual RKeyType firstKey ()
virtual RValueType get (IN(RKeyType) key)
virtual RSortedMapType headMap (IN(RKeyType) key)
virtual RKeySetType keySet ()
virtual RKeyType lastKey ()
virtual RValueType put (IN(RKeyType) key, IN(RValueType) val)
virtual void putAll (IN(RMapType) map)
virtual RValueType remove (IN(RKeyType) key)
virtual int size ()
virtual RSortedMapType subMap (IN(RKeyType) from, IN(RKeyType) to)
virtual RSortedMapType tailMap (IN(RKeyType) from)
virtual RValueCollectionType values ()
virtual bool equals (IN(acdk::lang::Object) other)
 Normally check for equality (not identity) Object::equals() is true only if both objects are the same instance.

virtual int hashCode ()
virtual bool isEmpty ()

Public Attributes

friends_private __pad0__: RRedBlackNodeType _root
int _size
RComparatorType _comparator
int _modCount
friends_private __pad1__: void putAllLinear(IN(RObjectArrayImpl<RMapEntryType>) entries) { double dHeight = Math::pow((double) entries->length()
friends_private double
int height = (int) dHeight
bool completed = (dHeight == ((double) height))
 _root = buildTree(entries, height, completed, 0, 0, entries->length())
friends_private __pad2__: static RRedBlackNodeType buildTree(IN(RObjectArrayImpl<RMapEntryType>) entries
friends_private int height
friends_private int bool completed
friends_private int bool int currentTier
friends_private int bool int
int 
start
friends_private int bool int
int int 
end


Member Typedef Documentation

template<class K, class V>
typedef SortedMapType::ComparatorType acdk::util::TTreeMap< K, V >::ComparatorType
 

Reimplemented from acdk::util::TSortedMap< K, V >.

template<class K, class V>
typedef SuperType::KeySetType acdk::util::TTreeMap< K, V >::KeySetType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef SuperType::MapEntrySetType acdk::util::TTreeMap< K, V >::MapEntrySetType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef MapType::MapEntryType acdk::util::TTreeMap< K, V >::MapEntryType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef TMap<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::MapType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef ComparatorType::RefType acdk::util::TTreeMap< K, V >::RComparatorType
 

Reimplemented from acdk::util::TSortedMap< K, V >.

template<class K, class V>
typedef TRedBlackNode<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::RedBlackNodeType
 

template<class K, class V>
typedef RThisType acdk::util::TTreeMap< K, V >::RefType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef KeySetType::RefType acdk::util::TTreeMap< K, V >::RKeySetType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef K acdk::util::TTreeMap< K, V >::RKeyType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef MapEntrySetType::RefType acdk::util::TTreeMap< K, V >::RMapEntrySetType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef MapEntryType::RefType acdk::util::TTreeMap< K, V >::RMapEntryType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef MapType::RefType acdk::util::TTreeMap< K, V >::RMapType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef RedBlackNodeType::RefType acdk::util::TTreeMap< K, V >::RRedBlackNodeType
 

template<class K, class V>
typedef SortedMapType::RefType acdk::util::TTreeMap< K, V >::RSortedMapType
 

Reimplemented from acdk::util::TSortedMap< K, V >.

template<class K, class V>
typedef RefHolder<ThisType> acdk::util::TTreeMap< K, V >::RThisType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef RThisType acdk::util::TTreeMap< K, V >::RTreeMapType
 

template<class K, class V>
typedef ValueCollectionType::RefType acdk::util::TTreeMap< K, V >::RValueCollectionType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef V acdk::util::TTreeMap< K, V >::RValueType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef TSortedMap<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::SortedMapType
 

Reimplemented from acdk::util::TSortedMap< K, V >.

template<class K, class V>
typedef TSubTreeMap<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::SubTreeMapType
 

template<class K, class V>
typedef TAbstractMap<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::SuperType
 

template<class K, class V>
typedef TTreeMap<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::ThisType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
typedef TTreeMapKeySet<RKeyType, RValueType> acdk::util::TTreeMap< K, V >::TreeMapKeySetType
 

template<class K, class V>
typedef ThisType acdk::util::TTreeMap< K, V >::TreeMapType
 

template<class K, class V>
typedef MapType::ValueCollectionType acdk::util::TTreeMap< K, V >::ValueCollectionType
 

Reimplemented from acdk::util::TAbstractMap< K, V >.


Constructor & Destructor Documentation

template<class K, class V>
acdk::util::TTreeMap< K, V >::TTreeMap IN(RMapType map = Nil,
IN(RComparatorType comp = Nil
[inline]
 

template<class K, class V>
acdk::util::TTreeMap< K, V >::~TTreeMap  )  [inline]
 


Member Function Documentation

template<class K, class V>
virtual void acdk::util::TTreeMap< K, V >::clear  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual acdk::lang::Object acdk::util::TTreeMap< K, V >::clone sys::Allocator *  alc  )  [inline, virtual]
 

Reimplemented from acdk::lang::Cloneable.

template<class K, class V>
virtual acdk::lang::Object acdk::util::TTreeMap< K, V >::clone  )  [inline, virtual]
 

Implements acdk::lang::Cloneable.

template<class K, class V>
virtual RComparatorType acdk::util::TTreeMap< K, V >::comparator  )  [inline, virtual]
 

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual bool acdk::util::TTreeMap< K, V >::containsKey IN(RKeyType key  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual bool acdk::util::TTreeMap< K, V >::containsValue IN(RValueType val  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
TTreeMap< K, V >::RMapEntrySetType acdk::util::TTreeMap< K, V >::entrySet  )  [virtual]
 

Implements acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual bool acdk::util::TTreeMap< K, V >::equals IN(acdk::lang::Object other  )  [inline, virtual]
 

Normally check for equality (not identity) Object::equals() is true only if both objects are the same instance.

See also:
serialized_equals()

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RKeyType acdk::util::TTreeMap< K, V >::firstKey  )  [inline, virtual]
 

Todo:
relay on NullPointerException

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual RValueType acdk::util::TTreeMap< K, V >::get IN(RKeyType key  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual int acdk::util::TTreeMap< K, V >::hashCode  )  [inline, virtual]
 

See also:
serialized_hashCode

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RSortedMapType acdk::util::TTreeMap< K, V >::headMap IN(RKeyType key  )  [inline, virtual]
 

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual bool acdk::util::TTreeMap< K, V >::isEmpty  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RKeySetType acdk::util::TTreeMap< K, V >::keySet  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RKeyType acdk::util::TTreeMap< K, V >::lastKey  )  [inline, virtual]
 

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual RValueType acdk::util::TTreeMap< K, V >::put IN(RKeyType key,
IN(RValueType val
[inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual void acdk::util::TTreeMap< K, V >::putAll IN(RMapType map  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RValueType acdk::util::TTreeMap< K, V >::remove IN(RKeyType key  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual int acdk::util::TTreeMap< K, V >::size  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.

template<class K, class V>
virtual RSortedMapType acdk::util::TTreeMap< K, V >::subMap IN(RKeyType from,
IN(RKeyType to
[inline, virtual]
 

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual RSortedMapType acdk::util::TTreeMap< K, V >::tailMap IN(RKeyType from  )  [inline, virtual]
 

Implements acdk::util::TSortedMap< K, V >.

template<class K, class V>
virtual RValueCollectionType acdk::util::TTreeMap< K, V >::values  )  [inline, virtual]
 

Reimplemented from acdk::util::TAbstractMap< K, V >.


Member Data Documentation

template<class K, class V>
friends_private acdk::util::TTreeMap< K, V >::__pad0__
 

template<class K, class V>
friends_private acdk::util::TTreeMap< K, V >::__pad1__
 

template<class K, class V>
friends_private acdk::util::TTreeMap< K, V >::__pad2__
 

template<class K, class V>
RComparatorType acdk::util::TTreeMap< K, V >::_comparator
 

template<class K, class V>
int acdk::util::TTreeMap< K, V >::_modCount
 

template<class K, class V>
acdk::util::TTreeMap< K, V >::_root = buildTree(entries, height, completed, 0, 0, entries->length())
 

template<class K, class V>
int acdk::util::TTreeMap< K, V >::_size
 

template<class K, class V>
friends_private int bool acdk::util::TTreeMap< K, V >::completed
 

template<class K, class V>
bool acdk::util::TTreeMap< K, V >::completed = (dHeight == ((double) height))
 

template<class K, class V>
friends_private int bool int acdk::util::TTreeMap< K, V >::currentTier
 

template<class K, class V>
friends_private acdk::util::TTreeMap< K, V >::double
 

template<class K, class V>
friends_private int bool int int int acdk::util::TTreeMap< K, V >::end
 

template<class K, class V>
friends_private int acdk::util::TTreeMap< K, V >::height
 

template<class K, class V>
int acdk::util::TTreeMap< K, V >::height = (int) dHeight
 

template<class K, class V>
friends_private int bool int int acdk::util::TTreeMap< K, V >::start