HOME

com.ireasoning.protocol.snmp
Class SnmpUInt

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.SnmpUInt
All Implemented Interfaces:
Msg, Serializable, SnmpDataType
Direct Known Subclasses:
SnmpCounter32, SnmpGauge32, SnmpTimeTicks

public class SnmpUInt
extends Object
implements SnmpDataType

This class represents an 32-bit snmp unsigned integer object. The UInteger32 type represents integer-valued information between 0 and 2^32-1 inclusive (0 to 4294967295 decimal).

See Also:
Serialized Form

Field Summary
static SnmpUInt MAX_VALUE
          Max value of unsigned integer
 
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
SnmpUInt()
          Constructs SnmpUInt object
SnmpUInt(long value)
          Constructs an SnmpUInt object with the specified value.
SnmpUInt(SnmpUInt uint32)
          Makes a copy of passed object
SnmpUInt(String value)
          Constructs an SnmpUInt object with the specified 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.UNSIGNED32
 String getTypeString()
          Returns "UnsignedInteger"
 long getValue()
          Returns the integer value of this object
 int hashCode()
          Returns a hash code value for the object
 void setValue(long value)
          Sets a new value
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final SnmpUInt MAX_VALUE
Max value of unsigned integer

Constructor Detail

SnmpUInt

public SnmpUInt()
Constructs SnmpUInt object


SnmpUInt

public SnmpUInt(String value)
Constructs an SnmpUInt object with the specified value.

Throws:
IllegalArgumentException - raised if passed value is negative or too big

SnmpUInt

public SnmpUInt(long value)
Constructs an SnmpUInt object with the specified value.

Throws:
IllegalArgumentException - raised if passed value is negative or too big

SnmpUInt

public SnmpUInt(SnmpUInt uint32)
Makes a copy of passed object

Method Detail

getValue

public long getValue()
Returns the integer value of this object


setValue

public void setValue(long value)
Sets a new value


getType

public int getType()
Returns SnmpDataType.UNSIGNED32

Specified by:
getType in interface SnmpDataType
Returns:
the object data type

getTypeString

public String getTypeString()
Returns "UnsignedInteger"

Specified by:
getTypeString in interface SnmpDataType

toString

public String toString()

copy

public SnmpDataType copy()
Description copied from interface: SnmpDataType
Makes a copy of itself

Specified by:
copy in interface SnmpDataType
Returns:
a deep copy of this object

encode

public int encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
           throws SnmpEncodingException
Description copied from interface: SnmpDataType
For internal use

Specified by:
encode in interface SnmpDataType
Throws:
SnmpEncodingException

equals

public boolean equals(Object obj)
Description copied from interface: SnmpDataType
Indicates whether some other object is "equal to" this one.

Specified by:
equals in interface SnmpDataType

hashCode

public int hashCode()
Description copied from interface: SnmpDataType
Returns a hash code value for the object

Specified by:
hashCode in interface SnmpDataType

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.