00001 /* 00002 * AbstractSet.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_ABSTRACT_SET_HPP 00017 #define COH_ABSTRACT_SET_HPP 00018 00019 #include "coherence/lang.ns" 00020 #include "coherence/util/AbstractCollection.hpp" 00021 #include "coherence/util/Set.hpp" 00022 00023 COH_OPEN_NAMESPACE2(coherence,util) 00024 00025 00026 /** 00027 * This class provides a skeletal implementation of the <tt>Set</tt> 00028 * interface to minimize the effort required to implement this 00029 * interface. 00030 * 00031 * The process of implementing a set by extending this class is identical 00032 * to that of implementing a Collection by extending AbstractCollection, 00033 * except that all of the methods and constructors in subclasses of this 00034 * class must obey the additional constraints imposed by the <tt>Set</tt> 00035 * interface (for instance, the <tt>add</tt> method must not permit addition 00036 * of multiple instances of an object to a set). 00037 * 00038 * @author js 2008.05.12 00039 */ 00040 class COH_EXPORT AbstractSet 00041 : public abstract_spec<AbstractSet, 00042 extends<AbstractCollection>, 00043 implements<Set> > 00044 { 00045 // ----- Object interface ----------------------------------------------- 00046 00047 public: 00048 /** 00049 * {@inheritDoc} 00050 */ 00051 virtual bool equals(Object::View v) const; 00052 00053 /** 00054 * {@inheritDoc} 00055 */ 00056 virtual size32_t hashCode() const; 00057 }; 00058 00059 COH_CLOSE_NAMESPACE2 00060 00061 #endif // COH_ABSTRACT_SET_HPP 00062