00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef COH_IDENTITY_HASH_MAP_HPP
00017 #define COH_IDENTITY_HASH_MAP_HPP
00018
00019 #include "coherence/lang.ns"
00020
00021 #include "coherence/util/SafeHashMap.hpp"
00022
00023 COH_OPEN_NAMESPACE2(coherence,util)
00024
00025
00026
00027
00028
00029
00030
00031
00032 class COH_EXPORT IdentityHashMap
00033 : public cloneable_spec<IdentityHashMap,
00034 extends<SafeHashMap> >
00035 {
00036 friend class factory<IdentityHashMap>;
00037
00038
00039
00040 protected:
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 IdentityHashMap(size32_t cInitialBuckets = 17,
00056 float32_t flLoadFactor = 1.0F,
00057 float32_t flGrowthRate = 3.0F);
00058
00059
00060
00061
00062 IdentityHashMap(const IdentityHashMap& that);
00063
00064
00065
00066
00067 protected:
00068
00069
00070
00071 virtual SafeHashMap::Entry::Handle instantiateEntry(Object::View vKey,
00072 Object::Holder ohValue, size32_t nHash);
00073
00074
00075
00076
00077 virtual SafeHashMap::Entry::Handle instantiateEntry(
00078 SafeHashMap::Entry::View vEntry);
00079
00080
00081
00082
00083 virtual size32_t getHashCode(Object::View vKey) const;
00084
00085
00086
00087 protected:
00088
00089
00090
00091 class COH_EXPORT Entry
00092 : public cloneable_spec<Entry,
00093 extends<SafeHashMap::Entry> >
00094 {
00095 friend class factory<Entry>;
00096
00097
00098
00099 protected:
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 Entry(Object::View vKey, Object::Holder ohValue,
00110 size32_t nHash);
00111
00112
00113
00114
00115 Entry(const Entry& that);
00116
00117
00118
00119
00120
00121
00122 Entry(Entry::View vThat);
00123
00124
00125
00126 protected:
00127
00128
00129
00130 virtual bool isKeyEqual(Object::View vKey) const;
00131 };
00132 };
00133
00134 COH_CLOSE_NAMESPACE2
00135
00136 #endif // COH_IDENTITY_HASH_MAP_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.