org.opennms.mock.snmp
Class MockSnmpValue

java.lang.Object
  extended by org.opennms.mock.snmp.MockSnmpValue
All Implemented Interfaces:
SnmpValue
Direct Known Subclasses:
MockSnmpValue.IpAddressSnmpValue, MockSnmpValue.NetworkAddressSnmpValue, MockSnmpValue.NumberSnmpValue, MockSnmpValue.OctetStringSnmpValue, MockSnmpValue.OidSnmpValue, MockSnmpValue.StringSnmpValue

public class MockSnmpValue
extends Object
implements SnmpValue


Nested Class Summary
static class MockSnmpValue.Counter32SnmpValue
           
static class MockSnmpValue.Counter64SnmpValue
           
static class MockSnmpValue.Gauge32SnmpValue
           
static class MockSnmpValue.Integer32SnmpValue
           
static class MockSnmpValue.IpAddressSnmpValue
           
static class MockSnmpValue.NetworkAddressSnmpValue
           
static class MockSnmpValue.NumberSnmpValue
           
static class MockSnmpValue.OctetStringSnmpValue
           
static class MockSnmpValue.OidSnmpValue
           
static class MockSnmpValue.StringSnmpValue
           
static class MockSnmpValue.TimeticksSnmpValue
           
 
Field Summary
static SnmpValue END_OF_MIB
           
static SnmpValue NO_SUCH_INSTANCE
           
static SnmpValue NO_SUCH_OBJECT
           
static SnmpValue NULL_VALUE
           
 
Fields inherited from interface org.opennms.netmgt.snmp.SnmpValue
SNMP_COUNTER32, SNMP_COUNTER64, SNMP_END_OF_MIB, SNMP_GAUGE32, SNMP_INT32, SNMP_IPADDRESS, SNMP_NO_SUCH_INSTANCE, SNMP_NO_SUCH_OBJECT, SNMP_NULL, SNMP_OBJECT_IDENTIFIER, SNMP_OCTET_STRING, SNMP_OPAQUE, SNMP_TIMETICKS
 
Constructor Summary
MockSnmpValue(int type, String value)
           
 
Method Summary
 boolean equals(Object obj)
           
 byte[] getBytes()
           
 int getType()
           
 String getValue()
           
 int hashCode()
           
 boolean isDisplayable()
           
 boolean isEndOfMib()
           
 boolean isError()
           
 boolean isNull()
           
 boolean isNumeric()
           
 BigInteger toBigInteger()
           
 String toDisplayString()
           
 String toHexString()
           
 InetAddress toInetAddress()
           
 int toInt()
           
 long toLong()
           
 SnmpObjId toSnmpObjId()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_VALUE

public static final SnmpValue NULL_VALUE

NO_SUCH_INSTANCE

public static final SnmpValue NO_SUCH_INSTANCE

NO_SUCH_OBJECT

public static final SnmpValue NO_SUCH_OBJECT

END_OF_MIB

public static final SnmpValue END_OF_MIB
Constructor Detail

MockSnmpValue

public MockSnmpValue(int type,
                     String value)
Method Detail

isEndOfMib

public boolean isEndOfMib()
Specified by:
isEndOfMib in interface SnmpValue

getType

public int getType()
Specified by:
getType in interface SnmpValue

toDisplayString

public String toDisplayString()
Specified by:
toDisplayString in interface SnmpValue

toString

public String toString()
Overrides:
toString in class Object

getValue

public String getValue()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isNumeric

public boolean isNumeric()
Specified by:
isNumeric in interface SnmpValue

isError

public boolean isError()
Specified by:
isError in interface SnmpValue

toInt

public int toInt()
Specified by:
toInt in interface SnmpValue

toInetAddress

public InetAddress toInetAddress()
Specified by:
toInetAddress in interface SnmpValue

toLong

public long toLong()
Specified by:
toLong in interface SnmpValue

toHexString

public String toHexString()
Specified by:
toHexString in interface SnmpValue

toBigInteger

public BigInteger toBigInteger()
Specified by:
toBigInteger in interface SnmpValue

toSnmpObjId

public SnmpObjId toSnmpObjId()
Specified by:
toSnmpObjId in interface SnmpValue

getBytes

public byte[] getBytes()
Specified by:
getBytes in interface SnmpValue

isDisplayable

public boolean isDisplayable()
Specified by:
isDisplayable in interface SnmpValue

isNull

public boolean isNull()
Specified by:
isNull in interface SnmpValue


Copyright © 2011. All Rights Reserved.