|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ireasoning.protocol.snmp.SnmpCounter64
This class represents snmp Counter64 type. The Counter64 type represents a non-negative integer which monotonically increases until it reaches a maximum value of 2^64-1 (18446744073709551615 decimal), when it wraps around and starts increasing again from zero.
Field Summary | |
static SnmpCounter64 |
MAX_VALUE
A constant holding the maximum value an SnmpCounter64 can have |
Fields inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
BITS, BITSTRING, COUNTER32, COUNTER64, END_OF_MIB_VIEW, END_OF_MIB_VIEW_OBJECT, GAUGE32, INTEGER, IPADDRESS, NO_SUCH_INSTANCE, NO_SUCH_INSTANCE_OBJECT, NO_SUCH_OBJECT, NO_SUCH_OBJECT_OBJECT, NULL, OCTETSTRING, OID, OPAQUE, PDU, SEQUENCE, SEQUENCEOF, serialVersionUID, TIMETICKS, UNSIGNED32, VARBIND |
Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
Constructor Summary | |
SnmpCounter64()
Constructs a new SnmpCounter64 object |
|
SnmpCounter64(BigInteger l)
Constructs an SnmpCounter64 object with the passed value. |
|
SnmpCounter64(long l)
Constructs an SnmpCounter64 object with the passed long value. |
|
SnmpCounter64(SnmpCounter64 count64)
Constructs an SnmpCounter64 object which is a copy of passed in object |
|
SnmpCounter64(String i)
Constructs an SnmpCounter64 object with the passed String value. |
Method Summary | |
SnmpDataType |
copy()
Makes a copy of itself |
int |
encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
For internal use |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
int |
getType()
Returns SnmpDataType.COUNTER64 |
String |
getTypeString()
Returns "Counter64" |
BigInteger |
getValue()
Returns the value as BigInteger data type of this object |
int |
hashCode()
Returns a hash code value for the object |
void |
inc()
Increments counter value by 1, wrap around if it reaches max. |
void |
inc(long val)
Increments Counter64 value by passed val |
void |
setValue(BigInteger value)
Sets a new value |
void |
setValue(long l)
Sets a new value |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final SnmpCounter64 MAX_VALUE
Constructor Detail |
public SnmpCounter64()
public SnmpCounter64(long l)
IllegalArgumentException
- raised if passed value is negativepublic SnmpCounter64(BigInteger l)
IllegalArgumentException
- raised if passed value is negative or too bigpublic SnmpCounter64(String i)
IllegalArgumentException
- raised if passed value is negativepublic SnmpCounter64(SnmpCounter64 count64)
Method Detail |
public BigInteger getValue()
public void inc(long val)
UnsupportedOperationException
- if called for SnmpCounter64.MAX_VALUEpublic void inc()
UnsupportedOperationException
- if called for SnmpCounter64.MAX_VALUEpublic void setValue(long l)
l
- a new long value
UnsupportedOperationException
- if called for SnmpCounter64.MAX_VALUEpublic void setValue(BigInteger value)
UnsupportedOperationException
- if called for SnmpCounter64.MAX_VALUEpublic String toString()
public int getType()
getType
in interface SnmpDataType
public String getTypeString()
getTypeString
in interface SnmpDataType
public SnmpDataType copy()
SnmpDataType
copy
in interface SnmpDataType
public int encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder) throws SnmpEncodingException
SnmpDataType
encode
in interface SnmpDataType
SnmpEncodingException
public boolean equals(Object obj)
SnmpDataType
equals
in interface SnmpDataType
public int hashCode()
SnmpDataType
hashCode
in interface SnmpDataType
|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |