public class ObjectIdentifierValue extends MibValue
Constructor and Description |
---|
ObjectIdentifierValue(FileLocation location,
ObjectIdentifierValue parent,
java.lang.String name,
int value)
Creates a new object identifier value.
|
ObjectIdentifierValue(FileLocation location,
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[] |
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.
|
java.lang.String |
getName()
Returns this object identifier component name.
|
ObjectIdentifierValue |
getParent()
Returns the parent object identifier value.
|
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(FileLocation location, ObjectIdentifierValue parent, java.lang.String name, int value) throws MibException
location
- the declaration file locationparent
- 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(FileLocation location, ValueReference parent, java.lang.String name, int value)
location
- the declaration file locationparent
- 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 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 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 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()