Package org.opennms.netmgt.snmp
Class SnmpObjId
- java.lang.Object
-
- org.opennms.netmgt.snmp.SnmpObjId
-
- All Implemented Interfaces:
java.lang.Comparable<SnmpObjId>
- Direct Known Subclasses:
SnmpInstId
public class SnmpObjId extends java.lang.Object implements java.lang.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(java.lang.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(java.lang.String inst)
SnmpObjId
append(SnmpObjId inst)
int
compareTo(SnmpObjId o)
static int[]
convertStringToInts(java.lang.String oid)
SnmpObjId
decrement()
boolean
equals(java.lang.Object obj)
static SnmpObjId
get(int[] ids)
static SnmpObjId
get(java.lang.String oid)
static SnmpObjId
get(java.lang.String objId, java.lang.String instance)
static SnmpObjId
get(SnmpObjId oid)
static SnmpObjId
get(SnmpObjId objId, java.lang.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()
java.lang.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(java.lang.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(java.lang.String oid)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addPrefixDotInToString
protected boolean addPrefixDotInToString()
-
compareTo
public int compareTo(SnmpObjId o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<SnmpObjId>
-
append
public SnmpObjId append(java.lang.String inst)
-
append
public SnmpObjId append(int[] instIds)
-
get
public static SnmpObjId get(java.lang.String oid)
-
get
public static SnmpObjId get(int[] ids)
-
get
public static SnmpObjId get(java.lang.String objId, java.lang.String instance)
-
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
-
-