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

IceGrid.PropertyDescriptor 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 `Descriptor.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * Property descriptor.
 *
 **/
public class PropertyDescriptor implements java.lang.Cloneable,
                                           java.io.Serializable
{
    /**
     * The name of the property.
     *
     **/
    public String name;

    /**
     * The value of the property.
     *
     **/
    public String value;

    public PropertyDescriptor()
    {
        this.name = "";
        this.value = "";
    }

    public PropertyDescriptor(String name, String value)
    {
        this.name = name;
        this.value = value;
    }

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

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

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::PropertyDescriptor");
        h_ = IceInternal.HashUtil.hashAdd(h_, name);
        h_ = IceInternal.HashUtil.hashAdd(h_, value);
        return h_;
    }

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

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        ostr.writeString(this.name);
        ostr.writeString(this.value);
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.name = istr.readString();
        this.value = istr.readString();
    }

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

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

    private static final PropertyDescriptor _nullMarshalValue = new PropertyDescriptor();

    public static final long serialVersionUID = -1049122307600492924L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy