|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.percederberg.mibble.MibValue
net.percederberg.mibble.value.ObjectIdentifierValue
public class ObjectIdentifierValue
An object identifier value. This class stores the component identifier values in a tree hierarchy.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.percederberg.mibble.MibValue |
---|
getReferenceSymbol, isReferenceTo, isReferenceTo, setReferenceSymbol |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 value
MibException
- 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 valueMethod Detail |
---|
public 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 type
MibException
- 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.
clear
in class MibValue
public int compareTo(java.lang.Object obj)
obj
- the object to compare to
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with
public int hashCode()
hashCode
in class java.lang.Object
public ObjectIdentifierValue getParent()
public java.lang.String getName()
getName
in class MibValue
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, 0 <= index < count
public ObjectIdentifierValue getChildByName(java.lang.String name)
name
- the child name
public ObjectIdentifierValue getChildByValue(int value)
value
- the child value
public ObjectIdentifierValue[] getAllChildren()
public java.lang.Object toObject()
toObject
in class MibValue
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDetailString()
public java.lang.String toAsn1String()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |