Month.java 2.09 KB
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_mile.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

package com.glsx.ice.HDaoMile;

/**
 * month mileage
 **/
public class Month implements Cloneable, java.io.Serializable
{
    public int year;

    public int mon;

    public Month()
    {
    }

    public Month(int year, int mon)
    {
        this.year = year;
        this.mon = mon;
    }

    public boolean
    equals(Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        Month _r = null;
        if(rhs instanceof Month)
        {
            _r = (Month)rhs;
        }

        if(_r != null)
        {
            if(year != _r.year)
            {
                return false;
            }
            if(mon != _r.mon)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::HDaoMile::Month");
        __h = IceInternal.HashUtil.hashAdd(__h, year);
        __h = IceInternal.HashUtil.hashAdd(__h, mon);
        return __h;
    }

    public Object
    clone()
    {
        Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeInt(year);
        __os.writeInt(mon);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        year = __is.readInt();
        mon = __is.readInt();
    }

    public static final long serialVersionUID = 4017350342780951895L;
}