Class DefaultMOTableRow

  • All Implemented Interfaces:
    java.lang.Comparable, MOTableRow
    Direct Known Subclasses:
    DefaultMOMutableRow2PC

    public class DefaultMOTableRow
    extends java.lang.Object
    implements MOTableRow, java.lang.Comparable
    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

      Fields 
      Modifier and Type Field Description
      protected org.snmp4j.smi.OID index  
      protected org.snmp4j.smi.Variable[] values  
    • 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
      int compareTo​(java.lang.Object o)
      Compares this row with a MOTableRow instance by their index values.
      boolean equals​(java.lang.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.
      java.lang.String toString()  
      protected java.lang.String toStringMembers()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • values

        protected org.snmp4j.smi.Variable[] values
      • index

        protected org.snmp4j.smi.OID index
    • Constructor Detail

      • DefaultMOTableRow

        public DefaultMOTableRow​(org.snmp4j.smi.OID index,
                                 org.snmp4j.smi.Variable[] values)
    • Method Detail

      • getBaseRow

        public MOTableRow 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 interface MOTableRow
        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 return OID("1").
        Specified by:
        getIndex in interface MOTableRow
        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 interface MOTableRow
        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 interface MOTableRow
        Returns:
        the column count.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMembers

        protected java.lang.String toStringMembers()
      • setBaseRow

        public void setBaseRow​(MOTableRow baseRow)
        Description copied from interface: MOTableRow
        Sets the associated base row.
        Specified by:
        setBaseRow in interface MOTableRow
        Parameters:
        baseRow - the base row.
      • compareTo

        public int compareTo​(java.lang.Object o)
        Compares this row with a MOTableRow instance by their index values.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        o - a MOTableRow instance
        Returns:
        getIndex().compareTo(o.getIndex())