Package org.snmp4j.agent.mo
Class DefaultMOTableRow
java.lang.Object
org.snmp4j.agent.mo.DefaultMOTableRow
- All Implemented Interfaces:
Comparable
,MOTableRow
- Direct Known Subclasses:
DefaultMOMutableRow2PC
The
DefaultMOTableRow
is the default table row implementation.
Instances are compared by their index value.
The base row reference is not supported, since the default row implementation
is designed for read-only tables. For mutable rows, use instances
implementing the MOMutableTableRow
interface.- Version:
- 1.10.1
- Author:
- Frank Fock
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultMOTableRow
(org.snmp4j.smi.OID index, org.snmp4j.smi.Variable[] values) -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this row with aMOTableRow
instance by their index values.boolean
Gets the associated base row for this row (if this row is a dependent row).org.snmp4j.smi.OID
getIndex()
Gets the row's index OID, for example the row index of the first row of an ifTable would returnOID("1")
.org.snmp4j.smi.Variable
getValue
(int column) Gets the value at the specified column index.int
hashCode()
void
setBaseRow
(MOTableRow baseRow) Sets the associated base row.int
size()
Returns the number of columns in this row.toString()
protected String
-
Field Details
-
values
protected org.snmp4j.smi.Variable[] values -
index
protected org.snmp4j.smi.OID index
-
-
Constructor Details
-
DefaultMOTableRow
public DefaultMOTableRow(org.snmp4j.smi.OID index, org.snmp4j.smi.Variable[] values)
-
-
Method Details
-
getBaseRow
Description copied from interface:MOTableRow
Gets the associated base row for this row (if this row is a dependent row).- Specified by:
getBaseRow
in interfaceMOTableRow
- Returns:
- the base row or
null
if this row is a base row itself.
-
getIndex
public org.snmp4j.smi.OID getIndex()Description copied from interface:MOTableRow
Gets the row's index OID, for example the row index of the first row of an ifTable would returnOID("1")
.- Specified by:
getIndex
in interfaceMOTableRow
- Returns:
- the row index of this row.
-
getValue
public org.snmp4j.smi.Variable getValue(int column) Description copied from interface:MOTableRow
Gets the value at the specified column index.- Specified by:
getValue
in interfaceMOTableRow
- Parameters:
column
- the zero-based column index.- Returns:
- the value at the specified index.
-
size
public int size()Description copied from interface:MOTableRow
Returns the number of columns in this row.- Specified by:
size
in interfaceMOTableRow
- Returns:
- the column count.
-
equals
-
hashCode
public int hashCode() -
toString
-
toStringMembers
-
setBaseRow
Description copied from interface:MOTableRow
Sets the associated base row.- Specified by:
setBaseRow
in interfaceMOTableRow
- Parameters:
baseRow
- the base row.
-
compareTo
Compares this row with aMOTableRow
instance by their index values.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- aMOTableRow
instance- Returns:
getIndex().compareTo(o.getIndex())
-