All Downloads are FREE. Search and download functionalities are using the official Maven repository.

IceGrid.ObjectInfo Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.3
//
// 
//
// Generated from file `Admin.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * Information about an Ice object.
 *
 **/
public class ObjectInfo implements java.lang.Cloneable,
                                   java.io.Serializable
{
    /**
     * The proxy of the object.
     *
     **/
    public Ice.ObjectPrx proxy;

    /**
     * The type of the object.
     *
     **/
    public String type;

    public ObjectInfo()
    {
        this.type = "";
    }

    public ObjectInfo(Ice.ObjectPrx proxy, String type)
    {
        this.proxy = proxy;
        this.type = type;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        ObjectInfo r = null;
        if(rhs instanceof ObjectInfo)
        {
            r = (ObjectInfo)rhs;
        }

        if(r != null)
        {
            if(this.proxy != r.proxy)
            {
                if(this.proxy == null || r.proxy == null || !this.proxy.equals(r.proxy))
                {
                    return false;
                }
            }
            if(this.type != r.type)
            {
                if(this.type == null || r.type == null || !this.type.equals(r.type))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::ObjectInfo");
        h_ = IceInternal.HashUtil.hashAdd(h_, proxy);
        h_ = IceInternal.HashUtil.hashAdd(h_, type);
        return h_;
    }

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

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        ostr.writeProxy(this.proxy);
        ostr.writeString(this.type);
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.proxy = istr.readProxy();
        this.type = istr.readString();
    }

    static public void
    ice_write(Ice.OutputStream ostr, ObjectInfo v)
    {
        if(v == null)
        {
            _nullMarshalValue.ice_writeMembers(ostr);
        }
        else
        {
            v.ice_writeMembers(ostr);
        }
    }

    static public ObjectInfo
    ice_read(Ice.InputStream istr)
    {
        ObjectInfo v = new ObjectInfo();
        v.ice_readMembers(istr);
        return v;
    }

    private static final ObjectInfo _nullMarshalValue = new ObjectInfo();

    public static final long serialVersionUID = 3381078691334222195L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy