BatchGpsDevInfoResponse.java 2.55 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_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

package com.glsx.ice.HDaoGps;

/**
 * batchResult:
 * 0:  ok for all users;
 * 1:  ok for part, the succesful part of device info is followed;
 * -1: failed,  the followed gpsDevInfo is meaningless.
 **/
public class BatchGpsDevInfoResponse implements Cloneable, java.io.Serializable
{
    public int batchResult;

    public GpsDevInfo[] gpsDevInfos;

    public BatchGpsDevInfoResponse()
    {
    }

    public BatchGpsDevInfoResponse(int batchResult, GpsDevInfo[] gpsDevInfos)
    {
        this.batchResult = batchResult;
        this.gpsDevInfos = gpsDevInfos;
    }

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

        if(_r != null)
        {
            if(batchResult != _r.batchResult)
            {
                return false;
            }
            if(!java.util.Arrays.equals(gpsDevInfos, _r.gpsDevInfos))
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BatchGpsDevInfoResponse");
        __h = IceInternal.HashUtil.hashAdd(__h, batchResult);
        __h = IceInternal.HashUtil.hashAdd(__h, gpsDevInfos);
        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(batchResult);
        GpsDevInfoSeqHelper.write(__os, gpsDevInfos);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        batchResult = __is.readInt();
        gpsDevInfos = GpsDevInfoSeqHelper.read(__is);
    }

    public static final long serialVersionUID = -59754444L;
}