SourceForge.net Logo

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
 
Method Summary
 int asn_type()
           
 long toInt64()
          Converts the value to java long.
 Object toJavaObject()
          Converts the value to a Java Object
 ASN_TYPE type()
           
 
Methods inherited from class org.netsnmp.ASN.ASNValue
compareTo, toBoolean, toInt, toOBJECTID, toOctetString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

Constructor Detail

COUNTER

public COUNTER(long data)
Creates a new instance of COUNTER

Method Detail

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

SourceForge.net Logo