MileStatEndResponse.java 4.75 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_track.rtMileStatSvc;

public class MileStatEndResponse implements Cloneable, java.io.Serializable
{
    public int oprResult;

    public int mileage;

    public GpsPos beginPos;

    public GpsPos endPos;

    public float over80Percent;

    public float over120Percent;

    public int maxSpeed;

    public int gpsBgnTime;

    public int gpsEndTime;

    public MileStatEndResponse()
    {
    }

    public MileStatEndResponse(int oprResult, int mileage, GpsPos beginPos, GpsPos endPos, float over80Percent, float over120Percent, int maxSpeed, int gpsBgnTime, int gpsEndTime)
    {
        this.oprResult = oprResult;
        this.mileage = mileage;
        this.beginPos = beginPos;
        this.endPos = endPos;
        this.over80Percent = over80Percent;
        this.over120Percent = over120Percent;
        this.maxSpeed = maxSpeed;
        this.gpsBgnTime = gpsBgnTime;
        this.gpsEndTime = gpsEndTime;
    }

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

        if(_r != null)
        {
            if(oprResult != _r.oprResult)
            {
                return false;
            }
            if(mileage != _r.mileage)
            {
                return false;
            }
            if(beginPos != _r.beginPos)
            {
                if(beginPos == null || _r.beginPos == null || !beginPos.equals(_r.beginPos))
                {
                    return false;
                }
            }
            if(endPos != _r.endPos)
            {
                if(endPos == null || _r.endPos == null || !endPos.equals(_r.endPos))
                {
                    return false;
                }
            }
            if(over80Percent != _r.over80Percent)
            {
                return false;
            }
            if(over120Percent != _r.over120Percent)
            {
                return false;
            }
            if(maxSpeed != _r.maxSpeed)
            {
                return false;
            }
            if(gpsBgnTime != _r.gpsBgnTime)
            {
                return false;
            }
            if(gpsEndTime != _r.gpsEndTime)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::HDaoMile::MileStatEndResponse");
        __h = IceInternal.HashUtil.hashAdd(__h, oprResult);
        __h = IceInternal.HashUtil.hashAdd(__h, mileage);
        __h = IceInternal.HashUtil.hashAdd(__h, beginPos);
        __h = IceInternal.HashUtil.hashAdd(__h, endPos);
        __h = IceInternal.HashUtil.hashAdd(__h, over80Percent);
        __h = IceInternal.HashUtil.hashAdd(__h, over120Percent);
        __h = IceInternal.HashUtil.hashAdd(__h, maxSpeed);
        __h = IceInternal.HashUtil.hashAdd(__h, gpsBgnTime);
        __h = IceInternal.HashUtil.hashAdd(__h, gpsEndTime);
        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(oprResult);
        __os.writeInt(mileage);
        beginPos.__write(__os);
        endPos.__write(__os);
        __os.writeFloat(over80Percent);
        __os.writeFloat(over120Percent);
        __os.writeInt(maxSpeed);
        __os.writeInt(gpsBgnTime);
        __os.writeInt(gpsEndTime);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        oprResult = __is.readInt();
        mileage = __is.readInt();
        beginPos = new GpsPos();
        beginPos.__read(__is);
        endPos = new GpsPos();
        endPos.__read(__is);
        over80Percent = __is.readFloat();
        over120Percent = __is.readFloat();
        maxSpeed = __is.readInt();
        gpsBgnTime = __is.readInt();
        gpsEndTime = __is.readInt();
    }

    public static final long serialVersionUID = -2311270876280708706L;
}