org.netsnmp.ASN
Class COUNTER
java.lang.Object
|
+--org.netsnmp.ASN.ASNValue
|
+--org.netsnmp.ASN.COUNTER
- All Implemented Interfaces:
- Comparable, Serializable
- Direct Known Subclasses:
- TIMETICKS, UNSIGNED
- public class COUNTER
- extends ASNValue
Used to represent a COUNTER type.
- Author:
- Andrew E. Page aepage@users.sourceforge.net
- See Also:
- Serialized Form
Field Summary |
long |
data
long is used instead of int, since java has no 'unsigned'
types and SNMP Counters are 32-bit unsigned integers |
static ASN_TYPE |
type
|
Constructor Summary |
COUNTER(long data)
Creates a new instance of COUNTER |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
public static final ASN_TYPE type
data
public long data
- long is used instead of int, since java has no 'unsigned'
types and SNMP Counters are 32-bit unsigned integers
COUNTER
public COUNTER(long data)
- Creates a new instance of COUNTER
toInt64
public long toInt64()
- Description copied from class:
ASNValue
- Converts the value to java long.
- Overrides:
toInt64
in class ASNValue
asn_type
public int asn_type()
- Specified by:
asn_type
in class ASNValue
type
public ASN_TYPE type()
- Specified by:
type
in class ASNValue
toJavaObject
public Object toJavaObject()
- Description copied from class:
ASNValue
- Converts the value to a Java Object
- Specified by:
toJavaObject
in class ASNValue