Package org.opennms.netmgt.snmp.mock
Class MockSnmpValue
- java.lang.Object
-
- org.opennms.netmgt.snmp.AbstractSnmpValue
-
- org.opennms.netmgt.snmp.mock.MockSnmpValue
-
- All Implemented Interfaces:
SnmpValue
- Direct Known Subclasses:
MockSnmpValue.IpAddressSnmpValue,MockSnmpValue.NetworkAddressSnmpValue,MockSnmpValue.NumberSnmpValue,MockSnmpValue.OctetStringSnmpValue,MockSnmpValue.OidSnmpValue,MockSnmpValue.StringSnmpValue
public class MockSnmpValue extends AbstractSnmpValue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMockSnmpValue.Counter32SnmpValuestatic classMockSnmpValue.Counter64SnmpValuestatic classMockSnmpValue.Gauge32SnmpValuestatic classMockSnmpValue.Integer32SnmpValuestatic classMockSnmpValue.IpAddressSnmpValuestatic classMockSnmpValue.NetworkAddressSnmpValuestatic classMockSnmpValue.NumberSnmpValuestatic classMockSnmpValue.OctetStringSnmpValuestatic classMockSnmpValue.OidSnmpValuestatic classMockSnmpValue.StringSnmpValuestatic classMockSnmpValue.TimeticksSnmpValue
-
Field Summary
Fields Modifier and Type Field Description static MockSnmpValueEND_OF_MIBstatic MockSnmpValueNO_SUCH_INSTANCEstatic MockSnmpValueNO_SUCH_OBJECTstatic MockSnmpValueNULL_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
Constructors Constructor Description MockSnmpValue(int type, String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)byte[]getBytes()intgetType()StringgetValue()inthashCode()booleanisDisplayable()booleanisEndOfMib()booleanisError()booleanisNull()booleanisNumeric()BigIntegertoBigInteger()StringtoDisplayString()StringtoHexString()InetAddresstoInetAddress()inttoInt()longtoLong()SnmpObjIdtoSnmpObjId()StringtoString()-
Methods inherited from class org.opennms.netmgt.snmp.AbstractSnmpValue
allBytesDisplayable, allBytesISO_8859_1, allBytesUTF_8
-
-
-
-
Field Detail
-
NULL_VALUE
public static final MockSnmpValue NULL_VALUE
-
NO_SUCH_INSTANCE
public static final MockSnmpValue NO_SUCH_INSTANCE
-
NO_SUCH_OBJECT
public static final MockSnmpValue NO_SUCH_OBJECT
-
END_OF_MIB
public static final MockSnmpValue END_OF_MIB
-
-
Constructor Detail
-
MockSnmpValue
public MockSnmpValue(int type, String value)
-
-
Method Detail
-
isEndOfMib
public boolean isEndOfMib()
-
getType
public int getType()
-
toDisplayString
public String toDisplayString()
-
getValue
public String getValue()
-
isNumeric
public boolean isNumeric()
-
isError
public boolean isError()
-
toInt
public int toInt()
-
toInetAddress
public InetAddress toInetAddress()
-
toLong
public long toLong()
-
toHexString
public String toHexString()
-
toBigInteger
public BigInteger toBigInteger()
-
toSnmpObjId
public SnmpObjId toSnmpObjId()
-
getBytes
public byte[] getBytes()
-
isDisplayable
public boolean isDisplayable()
-
isNull
public boolean isNull()
-
-