UniqueIdpublic final class UniqueId extends Object implements SerializableTitle: Represents a globabally unique Id
Company: |
Fields Summary |
---|
protected byte[] | id |
Constructors Summary |
---|
public UniqueId()
| public UniqueId(byte[] id)
this.id = id;
| public UniqueId(byte[] id, int offset, int length)
this.id = new byte[length];
System.arraycopy(id,offset,this.id,0,length);
|
Methods Summary |
---|
public boolean | equals(java.lang.Object other)
boolean result = (other instanceof UniqueId);
if ( result ) {
UniqueId uid = (UniqueId)other;
if ( this.id == null && uid.id == null ) result = true;
else if ( this.id == null && uid.id != null ) result = false;
else if ( this.id != null && uid.id == null ) result = false;
else result = Arrays.equals(this.id,uid.id);
}//end if
return result;
| public byte[] | getBytes()
return id;
| public int | hashCode()
if ( id == null ) return 0;
return Arrays.hashCode(id);
| public java.lang.String | toString()
StringBuffer buf = new StringBuffer("UniqueId");
buf.append(org.apache.catalina.tribes.util.Arrays.toString(id));
return buf.toString();
|
|