|
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--uk.co.westhawk.snmp.stack.AsnObject
|
+--uk.co.westhawk.snmp.stack.AsnObjectId
This class represents the ASN.1 ObjectID class. An Object ID (OID) identifies a variable in a MIB.
| Fields inherited from class uk.co.westhawk.snmp.stack.AsnObject |
contentsLength, debug, headerLength, isCorrect, startPos, type |
| Constructor Summary | |
AsnObjectId(java.lang.String s)
Constructs an AsnObjectId out of an OID string. |
|
| Method Summary | |
void |
add(long sub_oid)
Adds a single sub-identifier to the end of the OID. |
void |
add(long[] sub_oid)
Adds a number of sub-identifiers to the end of the OID. |
void |
add(java.lang.String s)
Adds sub-identifiers to the end of the OID. |
boolean |
equals(java.lang.Object anObject)
Compares this OID to the specified object. |
long |
getElementAt(int index)
Returns the element in the AsnObjectId at the specified index. |
int |
getSize()
Returns the number of elements in the AsnObjectId. |
java.lang.String |
getValue()
Returns the value of the AsnObjectId. |
int |
hashCode()
Returns a hash code for this OID. |
boolean |
startsWith(AsnObjectId prefix)
Checks if this OID starts with the specified prefix. |
java.lang.String |
toString()
Returns the string representation of the AsnObjectId. |
java.lang.String |
toString(long[] v)
Returns the string representation of the AsnObjectId. |
| Methods inherited from class uk.co.westhawk.snmp.stack.AsnObject |
getRespType, getRespTypeString, setDebug |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AsnObjectId(java.lang.String s)
throws java.lang.IllegalArgumentException
s - The OID, format a[.b]*| Method Detail |
public boolean startsWith(AsnObjectId prefix)
public void add(long sub_oid)
sub_oid - the sub-identifierpublic void add(long[] sub_oid)
sub_oid - the sub-identifiersAsnOctets.toSubOid(boolean)
public void add(java.lang.String s)
throws java.lang.IllegalArgumentException
s - the sub-identifiers, format a[.b]*public java.lang.String getValue()
public java.lang.String toString()
toString in class AsnObjectpublic java.lang.String toString(long[] v)
public int getSize()
public long getElementAt(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - the indexjava.lang.ArrayIndexOutOfBoundsException - if an invalid
index was givenpublic boolean equals(java.lang.Object anObject)
true if and only if the argument is not
null and is a AsnObjectId object that represents
the same sequence of numbers as this object.
Thanks to Eli Bishop (eli@graphesthesia.com) for the suggestion of adding it.
equals in class java.lang.ObjectanObject - the object to compare this AsnObjectId
against.true if the AsnObjectId are equal;
false otherwise.public int hashCode()
hashCode in class java.lang.Object
|
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||