Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.4.0)

E90870-01

coherence/util/MappedSet.hpp

00001 /*
00002 * MappedSet.hpp
00003 *
00004 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_MAPPED_SET_HPP
00017 #define COH_MAPPED_SET_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/MapKeySet.hpp"
00022 
00023 COH_OPEN_NAMESPACE2(coherence,util)
00024 
00025 
00026 /**
00027 * Set implementation which is backed by a Map.
00028 */
00029 class COH_EXPORT MappedSet
00030     : public cloneable_spec<MappedSet,
00031         extends<MapKeySet> >
00032     {
00033     friend class factory<MappedSet>;
00034 
00035     // ----- constructors ---------------------------------------------------
00036 
00037     protected:
00038         /**
00039         * Return a new MappedSet backed by the supplied Map.
00040         *
00041         * @param hMap  the map to use as storage
00042         */
00043         MappedSet(Map::Handle hMap);
00044 
00045         /**
00046         * Return a new MappedSet backed by the supplied Map.
00047         *
00048         * @param vMap  the map to use as storage
00049         */
00050         MappedSet(Map::View vMap);
00051 
00052         /**
00053         * Copy constructor.
00054         */
00055         MappedSet(const MappedSet& that);
00056 
00057 
00058     // ----- Set interface --------------------------------------------------
00059 
00060     public:
00061         /**
00062         * {@inheritDoc}
00063         */
00064         virtual bool add(Object::Holder oh);
00065 
00066         /**
00067         * {@inheritDoc}
00068         */
00069         virtual bool addAll(Collection::View vCol);
00070 
00071         /**
00072         * {@inheritDoc}
00073         */
00074         virtual Iterator::Handle iterator() const;
00075 
00076         /**
00077         * {@inheritDoc}
00078         */
00079         virtual Muterator::Handle iterator();
00080 
00081         /**
00082         * {@inheritDoc}
00083         */
00084         virtual ObjectArray::Handle toArray(
00085                 ObjectArray::Handle hoa = NULL) const;
00086     };
00087 
00088 COH_CLOSE_NAMESPACE2
00089 
00090 #endif // COH_MAPPED_SET
Copyright © 2000, 2019, Oracle and/or its affiliates. All rights reserved.