GenericIdentifiablepublic abstract class GenericIdentifiable extends Object implements com.sun.corba.se.spi.ior.Identifiable
Fields Summary |
---|
private int | id | private byte[] | data |
Constructors Summary |
---|
public GenericIdentifiable(int id, org.omg.CORBA_2_3.portable.InputStream is)
this.id = id ;
data = EncapsulationUtility.readOctets( is ) ;
| public GenericIdentifiable(int id, byte[] data)
this.id = id ;
this.data = (byte[])(data.clone()) ;
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (obj == null)
return false ;
if (!(obj instanceof GenericIdentifiable))
return false ;
GenericIdentifiable encaps = (GenericIdentifiable)obj ;
return (getId() == encaps.getId()) &&
Arrays.equals( getData(), encaps.getData() ) ;
| public byte[] | getData()
return data ;
| public int | getId()
return id ;
| public int | hashCode()
int result = 17 ;
for (int ctr=0; ctr<data.length; ctr++ )
result = 37*result + data[ctr] ;
return result ;
| public java.lang.String | toString()
return "GenericIdentifiable[id=" + getId() + "]" ;
| public void | write(org.omg.CORBA_2_3.portable.OutputStream os)
os.write_ulong( data.length ) ;
os.write_octet_array( data, 0, data.length ) ;
|
|