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

E90870-01

coherence/io/pof/RawYearMonthInterval.hpp

00001 /*
00002 * RawYearMonthInterval.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_RAW_YEAR_MONTH_INTERVAL_HPP
00017 #define COH_RAW_YEAR_MONTH_INTERVAL_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/io/pof/PofIntrinsic.hpp"
00022 
00023 
00024 
00025 COH_OPEN_NAMESPACE3(coherence,io,pof)
00026 
00027 
00028 /**
00029 * Raw POF year-month interval value.
00030 *
00031 * @author jh  2008.04.08
00032 */
00033 class COH_EXPORT RawYearMonthInterval
00034     : public cloneable_spec<RawYearMonthInterval,
00035           extends<Object>,
00036           implements<PofIntrinsic> >
00037     {
00038     friend class factory<RawYearMonthInterval>;
00039 
00040     // ----- constructors ---------------------------------------------------
00041 
00042     protected:
00043         /**
00044         * Construct a raw POF year-month interval value.
00045         *
00046         * @param cYears  the number of years in the year-month interval
00047         * @param cMonths the number of months in the year-month interval
00048         *
00049         * @return the new RawYearMonthInterval
00050         */
00051         RawYearMonthInterval(int32_t cYears, int32_t cMonths);
00052 
00053         /**
00054         * Copy constructor.
00055         */
00056         RawYearMonthInterval(const RawYearMonthInterval& that);
00057 
00058 
00059     // ----- Object interface -----------------------------------------------
00060 
00061     public:
00062         /**
00063         * {@inheritDoc}
00064         */
00065         virtual bool equals(Object::View v) const;
00066 
00067         /**
00068         * {@inheritDoc}
00069         */
00070         virtual size32_t hashCode() const;
00071 
00072         /**
00073         * {@inheritDoc}
00074         */
00075         virtual bool isImmutable() const;
00076 
00077         /**
00078         * {@inheritDoc}
00079         */
00080         virtual TypedHandle<const String> toString() const;
00081 
00082 
00083     // ----- accessors ------------------------------------------------------
00084 
00085     public:
00086         /**
00087         * Determine the number of years in the year-month interval.
00088         *
00089         * @return the number of years in the year-month interval
00090         */
00091         virtual int32_t getYears() const;
00092 
00093         /**
00094         * Determine the number of months in the year-month interval.
00095         *
00096         * @return the number of months in the year-month interval
00097         */
00098         virtual int32_t getMonths() const;
00099 
00100 
00101     // ----- data members ---------------------------------------------------
00102 
00103     protected:
00104         /**
00105         * The number of years in the year-month interval.
00106         */
00107         int32_t m_cYears;
00108 
00109         /**
00110         * The number of months in the year-month interval.
00111         */
00112         int32_t m_cMonths;
00113     };
00114 
00115 COH_CLOSE_NAMESPACE3
00116 
00117 #endif // COH_RAW_YEAR_MONTH_INTERVAL_HPP
Copyright © 2000, 2019, Oracle and/or its affiliates. All rights reserved.