|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.snmp2.SnmpVar | +--com.adventnet.snmp.snmp2.SnmpUnsignedInt
Class of SNMP Unsigned Integer Variable. This class can be used to created an SnmpVar object of type SnmpUnsignedInt. It also has methods to retrieve the value in different forms(eg. long String, byte).
Constructor Summary | |
SnmpUnsignedInt(long val)
Constructs a new SnmpUnsignedInt by taking a long type as its argument. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true, if both the SnmpUnsignedInt objects have the same value and false otherwise. |
java.lang.Object |
getVarObject()
Returns the value of this SnmpUnsignedInt as a Long object. |
long |
longValue()
Returns the value of this SnmpUnsignedInt as a long value. |
byte[] |
toBytes()
Returns the value of this SnmpUnsignedInt as raw bytes. |
java.lang.String |
toString()
To convert the value of this SnmpUnsignedInt to a printable string used in printing variables. |
java.lang.String |
toTagString()
To convert the value of this SnmpUnsignedInt object to a printable string where the type is tagged before the value with a tag UNSIGNED: . |
java.lang.Object |
toValue()
Returns the value of this SnmpUnsignedInt as a Long object. |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
createVariable, getError, getType, getTypeString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SnmpUnsignedInt(long val)
val
- the long type for creating a new SnmpUnsignedInt object.
The valid values ranges from 0 to 4294967295(both inclusive).the
- unsigned integer value. If this value is given lesser than
zero, then it will be taken as zero and if it is given greater than
the maximun, then the maximum value will be taken.Method Detail |
public java.lang.Object getVarObject()
getVarObject
in class SnmpVar
public java.lang.Object toValue()
toValue
in class SnmpVar
public long longValue()
public java.lang.String toString()
toString
in class SnmpVar
public java.lang.String toTagString()
toTagString
in class SnmpVar
public byte[] toBytes()
toBytes
in class SnmpVar
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |