geocoding_result.java 2.57 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 `ipoi.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

package com.glsx.ice.POI;

public class geocoding_result implements Cloneable, java.io.Serializable
{
    public int level;

    public int confidence;

    public geopoint pt;

    public geocoding_result()
    {
    }

    public geocoding_result(int level, int confidence, geopoint pt)
    {
        this.level = level;
        this.confidence = confidence;
        this.pt = pt;
    }

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

        if(_r != null)
        {
            if(level != _r.level)
            {
                return false;
            }
            if(confidence != _r.confidence)
            {
                return false;
            }
            if(pt != _r.pt)
            {
                if(pt == null || _r.pt == null || !pt.equals(_r.pt))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::POI::geocoding_result");
        __h = IceInternal.HashUtil.hashAdd(__h, level);
        __h = IceInternal.HashUtil.hashAdd(__h, confidence);
        __h = IceInternal.HashUtil.hashAdd(__h, pt);
        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(level);
        __os.writeInt(confidence);
        pt.__write(__os);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        level = __is.readInt();
        confidence = __is.readInt();
        pt = new geopoint();
        pt.__read(__is);
    }

    public static final long serialVersionUID = 1122579679L;
}