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

E26041-01

coherence/util/filter/EqualsFilter.hpp

00001 /*
00002 * EqualsFilter.hpp
00003 *
00004 * Copyright (c) 2000, 2013, 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_EQUALS_FILTER_HPP
00017 #define COH_EQUALS_FILTER_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/ValueExtractor.hpp"
00022 #include "coherence/util/filter/ComparisonFilter.hpp"
00023 #include "coherence/util/filter/IndexAwareFilter.hpp"
00024 
00025 COH_OPEN_NAMESPACE3(coherence,util,filter)
00026 
00027 
00028 /**
00029 * Filter which compares the result of a method invocation with a value for
00030 * equality.
00031 *
00032 * @author djl  2008.03.23
00033 */
00034 class COH_EXPORT EqualsFilter
00035     : public class_spec<EqualsFilter,
00036         extends<ComparisonFilter>,
00037         implements<IndexAwareFilter> >
00038     {
00039     friend class factory<EqualsFilter>;
00040 
00041     // ----- constructors ---------------------------------------------------
00042 
00043     protected:
00044         /**
00045         * Default constructor (necessary for the PortableObject interface).
00046         */
00047         EqualsFilter();
00048 
00049         /**
00050         * Construct an EqualsFilter for testing equality.
00051         *
00052         * @param vValueExtractor  the ValueExtractor to use by this filter
00053         * @param vValue           the object to compare the result with
00054         */
00055         EqualsFilter(ValueExtractor::View vValueExtractor,
00056                 Object::View vValue);
00057 
00058     private:
00059         /**
00060         * Blocked copy constructor.
00061         */
00062         EqualsFilter(const EqualsFilter&);
00063 
00064         
00065     // ----- ExtractorFilter interface --------------------------------------
00066 
00067     protected:
00068         /**
00069         * {@inheritDoc}
00070         */
00071         virtual bool evaluateExtracted(Object::View vExtracted) const;
00072 
00073 
00074     // ----- IndexAwareFilter interface -------------------------------------
00075 
00076     public:
00077         /**
00078         * {@inheritDoc}
00079         */
00080         virtual size32_t calculateEffectiveness(Map::View vMapIndexes,
00081                 Set::View vSetKeys) const;
00082 
00083         /**
00084         * {@inheritDoc}
00085         */
00086         virtual Filter::View applyIndex(Map::View vMapIndexes,
00087                 Set::Handle hSetKeys) const;
00088     };
00089 
00090 COH_CLOSE_NAMESPACE3
00091 
00092 #endif // COH_EQUALS_FILTER_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.