public class ObjectIdentifierValue extends MibValue
Constructor and Description |
---|
ObjectIdentifierValue(MibFileRef fileRef,
ObjectIdentifierValue parent,
java.lang.String name,
int value)
Creates a new object identifier value.
|
ObjectIdentifierValue(MibFileRef fileRef,
ValueReference parent,
java.lang.String name,
int value)
Creates a new object identifier value.
|
ObjectIdentifierValue(java.lang.String name,
int value)
Creates a new root object identifier value.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clear()
Clears and prepares this value for garbage collection.
|
int |
compareTo(java.lang.Object obj)
Compares this object with the specified object for order.
|
MibValue |
createReference()
Creates a value reference to this value.
|
boolean |
equals(java.lang.Object obj)
Checks if this object equals another object.
|
ObjectIdentifierValue |
find(java.lang.String oid)
Searches the OID tree for the best match.
|
ObjectIdentifierValue |
findAncestor(java.lang.String oid)
Searches the OID tree for the best matching ancestor.
|
ObjectIdentifierValue |
findDescendant(java.lang.String oid)
Searches the OID tree for the best matching descendant.
|
ObjectIdentifierValue[] |
getAllChildren()
Returns an array of all child object identifier values.
|
ObjectIdentifierValue |
getChild(int index)
Returns a child object identifier value.
|
ObjectIdentifierValue |
getChildByName(java.lang.String name)
Returns a child object identifier value.
|
ObjectIdentifierValue |
getChildByValue(int value)
Returns a child object identifier value.
|
int |
getChildCount()
Returns the number of child object identifier values.
|
Mib |
getMib()
Returns the MIB that this object identifier is connected to.
|
java.lang.String |
getName()
Returns this object identifier component name.
|
ObjectIdentifierValue |
getParent()
Returns the parent object identifier value.
|
int[] |
getParentValues()
Returns an array of all the numeric values the OID chain.
|
MibValueSymbol |
getSymbol()
Returns the symbol connected to this object identifier.
|
int |
getValue()
Returns this object identifier component value.
|
int |
hashCode()
Returns a hash code for this object.
|
MibValue |
initialize(MibLoaderLog log,
MibType type)
Initializes the MIB value.
|
void |
setSymbol(MibValueSymbol symbol)
Sets the symbol connected to this object identifier.
|
java.lang.String |
toAsn1String()
Returns an ASN.1 representation of this value.
|
java.lang.String |
toDetailString()
Returns a detailed string representation of this value.
|
java.lang.Object |
toObject()
Returns a string representation of this value.
|
java.lang.String |
toString()
Returns a string representation of this value.
|
getReferenceSymbol, isReferenceTo, isReferenceTo, setReferenceSymbol
public ObjectIdentifierValue(java.lang.String name, int value)
name
- the component name, or nullvalue
- the component valuepublic ObjectIdentifierValue(MibFileRef fileRef, ObjectIdentifierValue parent, java.lang.String name, int value) throws MibException
fileRef
- the definition MIB file referenceparent
- the component parentname
- the component name, or nullvalue
- the component valueMibException
- if the object identifier parent already
had a child with the specified valuepublic ObjectIdentifierValue(MibFileRef fileRef, ValueReference parent, java.lang.String name, int value)
fileRef
- the definition MIB file referenceparent
- the component parentname
- the component name, or nullvalue
- the component valuepublic MibValue initialize(MibLoaderLog log, MibType type) throws MibException
NOTE: This is an internal method that should only be called by the MIB loader.
initialize
in class MibValue
log
- the MIB loader logtype
- the value typeMibException
- if an error was encountered during the
initializationpublic MibValue createReference()
NOTE: This is an internal method that should only be called by the MIB loader.
createReference
in class MibValue
protected void clear()
NOTE: This is an internal method that should only be called by the MIB loader.
public int compareTo(java.lang.Object obj)
obj
- the object to compare topublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare withpublic int hashCode()
hashCode
in class java.lang.Object
public ObjectIdentifierValue getParent()
public int[] getParentValues()
public java.lang.String getName()
public int getValue()
public MibValueSymbol getSymbol()
public void setSymbol(MibValueSymbol symbol)
NOTE: This is an internal method that should only be called by the MIB loader.
symbol
- the value symbolpublic Mib getMib()
public int getChildCount()
public ObjectIdentifierValue getChild(int index)
index
- the child position, starting from 0public ObjectIdentifierValue getChildByName(java.lang.String name)
name
- the child namepublic ObjectIdentifierValue getChildByValue(int value)
value
- the child valuepublic ObjectIdentifierValue[] getAllChildren()
public ObjectIdentifierValue find(java.lang.String oid)
oid
- the numeric OID string to search forpublic ObjectIdentifierValue findAncestor(java.lang.String oid)
oid
- the numeric OID string to search forpublic ObjectIdentifierValue findDescendant(java.lang.String oid)
oid
- the numeric OID string to search forpublic java.lang.Object toObject()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDetailString()
public java.lang.String toAsn1String()