- java.lang.Object
-
- org.snmp4j.agent.mo.DefaultMOTableRow
-
- All Implemented Interfaces:
java.lang.Comparable<MOTableRow>,MOTableRow
- Direct Known Subclasses:
DefaultMOMutableRow2PC
public class DefaultMOTableRow extends java.lang.Object implements MOTableRow, java.lang.Comparable<MOTableRow>
TheDefaultMOTableRowis 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 theMOMutableTableRowinterface.- Version:
- 3.1.0
- Author:
- Frank Fock
-
-
Constructor Summary
Constructors Constructor Description DefaultMOTableRow(org.snmp4j.smi.OID index, org.snmp4j.smi.Variable[] values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MOTableRow o)Compares this row with aMOTableRowinstance by their index values.booleanequals(java.lang.Object obj)MOTableRowgetBaseRow()Gets the associated base row for this row (if this row is a dependent row).org.snmp4j.smi.OIDgetIndex()Gets the row's index OID, for example the row index of the first row of an ifTable would returnOID("1").org.snmp4j.smi.VariablegetValue(int column)Gets the value at the specified column index.inthashCode()voidsetBaseRow(MOTableRow baseRow)Sets the associated base row.intsize()Returns the number of columns in this row.java.lang.StringtoString()protected java.lang.StringtoStringMembers()
-
-
-
Method Detail
-
getBaseRow
public MOTableRow getBaseRow()
Description copied from interface:MOTableRowGets the associated base row for this row (if this row is a dependent row).- Specified by:
getBaseRowin interfaceMOTableRow- Returns:
- the base row or
nullif this row is a base row itself.
-
getIndex
public org.snmp4j.smi.OID getIndex()
Description copied from interface:MOTableRowGets the row's index OID, for example the row index of the first row of an ifTable would returnOID("1").- Specified by:
getIndexin interfaceMOTableRow- Returns:
- the row index of this row.
-
getValue
public org.snmp4j.smi.Variable getValue(int column)
Description copied from interface:MOTableRowGets the value at the specified column index.- Specified by:
getValuein interfaceMOTableRow- Parameters:
column- the zero-based column index.- Returns:
- the value at the specified index.
-
size
public int size()
Description copied from interface:MOTableRowReturns the number of columns in this row.- Specified by:
sizein interfaceMOTableRow- Returns:
- the column count.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringMembers
protected java.lang.String toStringMembers()
-
setBaseRow
public void setBaseRow(MOTableRow baseRow)
Description copied from interface:MOTableRowSets the associated base row.- Specified by:
setBaseRowin interfaceMOTableRow- Parameters:
baseRow- the base row.
-
compareTo
public int compareTo(MOTableRow o)
Compares this row with aMOTableRowinstance by their index values.- Specified by:
compareToin interfacejava.lang.Comparable<MOTableRow>- Parameters:
o- aMOTableRowinstance- Returns:
getIndex().compareTo(o.getIndex())
-
-