public final class ObjectIdentifier extends Object
| Constructor and Description |
|---|
ObjectIdentifier(int[] oid)
Creates ObjectIdentifier(OID) from array of integers.
|
ObjectIdentifier(int[] oid,
String name,
Object oidGroup)
Creates ObjectIdentifier(OID) from array of integers.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Compares object with OID for equality.
|
Object |
getGroup()
Gets OID's group.
|
String |
getName()
Gets OID's name.
|
int[] |
getOid()
Gets OID.
|
int |
hashCode()
Returns an integer hash code for this object.
|
static int |
hashIntArray(int[] array)
Returns hash code for array of integers
|
String |
toOIDString()
Add "OID." to the beginning of string representation.
|
String |
toString()
Overrides Object.toString()
|
static void |
validateOid(int[] oid)
Validates ObjectIdentifier (OID).
|
public ObjectIdentifier(int[] oid)
oid - - array of integersNullPointerException - - if oid is nullIllegalArgumentException - - if oid is invalidpublic ObjectIdentifier(int[] oid,
String name,
Object oidGroup)
oid - - array of integersname - - name of OIDoidGroup - - OID's group. Is used to separate different OID'sNullPointerException - - if oid is nullIllegalArgumentException - - if oid is invalidpublic int[] getOid()
public String getName()
public Object getGroup()
public boolean equals(Object o)
equals in class Objecto - the object to compare this instance with.Object.hashCode()public String toOIDString()
public String toString()
public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.hashCode()public static void validateOid(int[] oid)
oid - - oid as array of integersNullPointerException - - if oid is nullIllegalArgumentException - - if oid is invalidpublic static int hashIntArray(int[] array)
oid - - array of integers