GpsPos.java 2.74 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;

/**
 * common
 **/
public class GpsPos implements Cloneable, java.io.Serializable
{
    public int gpsTime;

    public int lng;

    public int lat;

    public String addr;

    public GpsPos()
    {
    }

    public GpsPos(int gpsTime, int lng, int lat, String addr)
    {
        this.gpsTime = gpsTime;
        this.lng = lng;
        this.lat = lat;
        this.addr = addr;
    }

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

        if(_r != null)
        {
            if(gpsTime != _r.gpsTime)
            {
                return false;
            }
            if(lng != _r.lng)
            {
                return false;
            }
            if(lat != _r.lat)
            {
                return false;
            }
            if(addr != _r.addr)
            {
                if(addr == null || _r.addr == null || !addr.equals(_r.addr))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::HDaoMile::GpsPos");
        __h = IceInternal.HashUtil.hashAdd(__h, gpsTime);
        __h = IceInternal.HashUtil.hashAdd(__h, lng);
        __h = IceInternal.HashUtil.hashAdd(__h, lat);
        __h = IceInternal.HashUtil.hashAdd(__h, addr);
        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(gpsTime);
        __os.writeInt(lng);
        __os.writeInt(lat);
        __os.writeString(addr);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        gpsTime = __is.readInt();
        lng = __is.readInt();
        lat = __is.readInt();
        addr = __is.readString();
    }

    public static final long serialVersionUID = 453123698L;
}