00001 /* 00002 * EntryAwareComparator.hpp 00003 * 00004 * Copyright (c) 2000, 2010, 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_ENTRY_AWARE_COMPARATOR_HPP 00017 #define COH_ENTRY_AWARE_COMPARATOR_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/util/Comparator.hpp" 00022 00023 COH_OPEN_NAMESPACE3(coherence,util,comparator) 00024 00025 00026 /** 00027 * EntryAwareComparator is an extension to the Comparator interface that 00028 * allows the EntryComparator to know whether the underlying comparator 00029 * expects to compare the corresponding Entries' keys or values. 00030 * 00031 * @author djl 2008.05.05 00032 */ 00033 class COH_EXPORT EntryAwareComparator 00034 : public interface_spec<EntryAwareComparator, 00035 implements<Comparator> > 00036 { 00037 // ----- EntryAwareComparator interface --------------------------------- 00038 00039 public: 00040 /** 00041 * Specifies whether this comparator expects to compare keys or values. 00042 * 00043 * @return true if Entry keys are expected; false otherwise 00044 */ 00045 virtual bool isKeyComparator() const = 0; 00046 }; 00047 00048 COH_CLOSE_NAMESPACE3 00049 00050 #endif // COH_ENTRY_AWARE_COMPARATOR_HPP