2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FBaseColMapEntry.cpp
20 * @brief This is the implementation for MapEntry class.
23 #include <FBaseColMapEntry.h>
24 #include <FBaseErrors.h>
27 namespace Tizen { namespace Base { namespace Collection
30 MapEntry::MapEntry(void)
33 , __pMapEntryImpl(null)
37 MapEntry::MapEntry(const Object& pKey, const Object& pValue)
38 : __pMapEntryImpl(null)
40 _pKey = const_cast <Object*>(&pKey);
41 _pValue = const_cast <Object*>(&pValue);
44 MapEntry::~MapEntry(void)
49 MapEntry::GetKey(void) const
55 MapEntry::GetValue(void) const
61 MapEntry::GetKey(void)
67 MapEntry::GetValue(void)
73 MapEntry::Equals(const Object& obj) const
75 const MapEntry* pOther = dynamic_cast <const MapEntry*>(&obj);
81 if (_pKey->Equals(*(pOther->_pKey)) && _pValue->Equals(*(pOther->_pValue)))
89 MapEntry::GetHashCode(void) const
94 hash += _pKey->GetHashCode();
98 hash += _pValue->GetHashCode();
102 } } } // Tizen::Base::Collection