@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class OID extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<OID>
| Constructor and Description |
|---|
OID(int... components)
Creates a new OID object from the provided set of numeric components.
|
OID(java.util.List<java.lang.Integer> components)
Creates a new OID object from the provided set of numeric components.
|
OID(java.lang.String oidString)
Creates a new OID object from the provided string representation.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(OID oid)
Indicates the position of the provided object relative to this OID in a
sorted list.
|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this OID.
|
java.util.List<java.lang.Integer> |
getComponents()
Retrieves the numeric components that comprise this OID.
|
int |
hashCode()
Retrieves a hash code for this OID.
|
boolean |
isValidNumericOID()
Indicates whether this object represents a valid numeric OID.
|
static java.util.List<java.lang.Integer> |
parseComponents(java.lang.String oidString)
Parses the provided string as a numeric OID and extracts the numeric
components from it.
|
java.lang.String |
toString()
Retrieves a string representation of this OID.
|
public OID(java.lang.String oidString)
oidString - The string to use to create this OID.public OID(int... components)
components - The numeric components to include in the OID.public OID(java.util.List<java.lang.Integer> components)
components - The numeric components to include in the OID.public static java.util.List<java.lang.Integer> parseComponents(java.lang.String oidString)
oidString - The string to parse as a numeric OID.null if the provided string does not represent a valid
numeric OID.public boolean isValidNumericOID()
true if this object represents a valid numeric OID, or
false if not.public java.util.List<java.lang.Integer> getComponents()
null value if isValidNumericOID() returns
true.null if
this object does not represent a valid numeric OID.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object for which to make the determination.true if the provided object is equal to this OID, or
false if not.public int compareTo(OID oid)
compareTo in interface java.lang.Comparable<OID>oid - The OID to compare against this OID.public java.lang.String toString()
toString in class java.lang.Object