public class DefaultMOTableRow extends Object implements MOTableRow, Comparable
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.Modifier and Type | Field and Description |
---|---|
protected org.snmp4j.smi.OID |
index |
protected org.snmp4j.smi.Variable[] |
values |
Constructor and Description |
---|
DefaultMOTableRow(org.snmp4j.smi.OID index,
org.snmp4j.smi.Variable[] values) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Compares this row with a
MOTableRow instance
by their index values. |
boolean |
equals(Object obj) |
MOTableRow |
getBaseRow()
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 return
OID("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.
|
String |
toString() |
protected String |
toStringMembers() |
protected org.snmp4j.smi.Variable[] values
protected org.snmp4j.smi.OID index
public DefaultMOTableRow(org.snmp4j.smi.OID index, org.snmp4j.smi.Variable[] values)
public MOTableRow getBaseRow()
MOTableRow
getBaseRow
in interface MOTableRow
null
if this row is a base row itself.public org.snmp4j.smi.OID getIndex()
MOTableRow
OID("1")
.getIndex
in interface MOTableRow
public org.snmp4j.smi.Variable getValue(int column)
MOTableRow
getValue
in interface MOTableRow
column
- the zero-based column index.public int size()
MOTableRow
size
in interface MOTableRow
protected String toStringMembers()
public void setBaseRow(MOTableRow baseRow)
MOTableRow
setBaseRow
in interface MOTableRow
baseRow
- the base row.public int compareTo(Object o)
MOTableRow
instance
by their index values.compareTo
in interface Comparable
o
- a MOTableRow
instancegetIndex().compareTo(o.getIndex())
Copyright © 2016 SNMP4J.org. All rights reserved.