40 |
|
|
41 |
import org.omg.CORBA.portable.IDLEntity; |
import org.omg.CORBA.portable.IDLEntity; |
42 |
|
|
43 |
|
import java.util.zip.Adler32; |
44 |
|
|
45 |
/** |
/** |
46 |
* The name component, a node in the multi-comonent name. |
* The name component, a node in the multi-comonent name. |
47 |
* |
* |
117 |
{ |
{ |
118 |
return id + "." + kind; |
return id + "." + kind; |
119 |
} |
} |
|
} |
|
120 |
|
|
121 |
|
/** |
122 |
|
* Return the hashCode of this NameComponent. |
123 |
|
*/ |
124 |
|
public int hashCode() |
125 |
|
{ |
126 |
|
Adler32 adler = new Adler32(); |
127 |
|
adler.update(toString().getBytes()); |
128 |
|
return (int) adler.getValue() & Integer.MAX_VALUE; |
129 |
|
} |
130 |
|
} |