// ********************************************************************** // // Copyright (c) 2003-2010 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.4.1 package Ice; // <auto-generated> // // Generated from file `Identity.ice' // // Warning: do not edit this file. // // </auto-generated> /** * The identity of an Ice object. In a proxy, an empty {@link Identity#name} denotes a nil * proxy. An identity with an empty {@link Identity#name} and a non-empty {@link Identity#category} * is illegal. You cannot add a servant with an empty name to the Active Servant Map. * * @see ServantLocator * @see ObjectAdapter#addServantLocator * **/ public class Identity implements java.lang.Cloneable, java.io.Serializable { /** * The name of the Ice object. * **/ public String name; /** * The Ice object category. * **/ public String category; public Identity() { } public Identity(String name, String category) { this.name = name; this.category = category; } public boolean equals(java.lang.Object rhs) { if(this == rhs) { return true; } Identity _r = null; try { _r = (Identity)rhs; } catch(ClassCastException ex) { } if(_r != null) { if(name != _r.name) { if(name == null || _r.name == null || !name.equals(_r.name)) { return false; } } if(category != _r.category) { if(category == null || _r.category == null || !category.equals(_r.category)) { return false; } } return true; } return false; } public int hashCode() { int __h = 0; if(name != null) { __h = 5 * __h + name.hashCode(); } if(category != null) { __h = 5 * __h + category.hashCode(); } return __h; } public java.lang.Object clone() { java.lang.Object o = null; try { o = super.clone(); } catch(CloneNotSupportedException ex) { assert false; // impossible } return o; } public void __write(IceInternal.BasicStream __os) { __os.writeString(name); __os.writeString(category); } public void __read(IceInternal.BasicStream __is) { name = __is.readString(); category = __is.readString(); } }