Package org.opennms.netmgt.snmp
Class SnmpObjId
- java.lang.Object
-
- org.opennms.netmgt.snmp.SnmpObjId
-
- All Implemented Interfaces:
Comparable<SnmpObjId>
- Direct Known Subclasses:
SnmpInstId
public class SnmpObjId extends Object implements Comparable<SnmpObjId>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SnmpObjId()
protected
SnmpObjId(int[] ids)
These constructors are private.SnmpObjId(int[] ids, boolean clone)
These constructors are private.protected
SnmpObjId(String oid)
These constructors are private.protected
SnmpObjId(SnmpObjId oid)
These constructors are private.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addPrefixDotInToString()
SnmpObjId
append(int[] instIds)
SnmpObjId
append(String inst)
SnmpObjId
append(SnmpObjId inst)
int
compareTo(SnmpObjId o)
static int[]
convertStringToInts(String oid)
SnmpObjId
decrement()
boolean
equals(Object obj)
static SnmpObjId
get(int[] ids)
static SnmpObjId
get(String oid)
static SnmpObjId
get(String objId, String instance)
static SnmpObjId
get(SnmpObjId oid)
static SnmpObjId
get(SnmpObjId objId, String instance)
static SnmpObjId
get(SnmpObjId objId, SnmpObjId instance)
int[]
getIds()
SnmpInstId
getInstance(SnmpObjId base)
int
getLastSubId()
SnmpObjId
getPrefix(int length)
int
getSubIdAt(int index)
int
hashCode()
boolean
isPrefixOf(SnmpObjId other)
boolean
isSuccessorOf(SnmpObjId base)
If requesting a GETNEXT on the given base OID, would the current OID be expected in a response? Returnstrue
if this OID is a successor (greater than) the given OID, orfalse
otherwise.int
length()
String
toString()
-
-
-
Constructor Detail
-
SnmpObjId
protected SnmpObjId()
-
SnmpObjId
public SnmpObjId(int[] ids, boolean clone)
These constructors are private. The get method should be called to create a new oid
-
SnmpObjId
protected SnmpObjId(int[] ids)
These constructors are private. The get method should be called to create a new oid
-
SnmpObjId
protected SnmpObjId(String oid)
These constructors are private. The get method should be called to create a new oid
-
SnmpObjId
protected SnmpObjId(SnmpObjId oid)
These constructors are private. The get method should be called to create a new oid
-
-
Method Detail
-
getIds
public int[] getIds()
-
convertStringToInts
public static int[] convertStringToInts(String oid)
-
addPrefixDotInToString
protected boolean addPrefixDotInToString()
-
compareTo
public int compareTo(SnmpObjId o)
- Specified by:
compareTo
in interfaceComparable<SnmpObjId>
-
append
public SnmpObjId append(int[] instIds)
-
get
public static SnmpObjId get(int[] ids)
-
isPrefixOf
public boolean isPrefixOf(SnmpObjId other)
-
getInstance
public SnmpInstId getInstance(SnmpObjId base)
-
length
public int length()
-
getPrefix
public SnmpObjId getPrefix(int length)
-
getSubIdAt
public int getSubIdAt(int index)
-
getLastSubId
public int getLastSubId()
-
decrement
public SnmpObjId decrement()
-
isSuccessorOf
public boolean isSuccessorOf(SnmpObjId base)
If requesting a GETNEXT on the given base OID, would the current OID be expected in a response? Returnstrue
if this OID is a successor (greater than) the given OID, orfalse
otherwise.- Parameters:
base
- base oid against which to compare- Returns:
- true if this OID is a successor of the "base" oid, false otherwise
-
-