Class DefaultMOTableModel<R extends MOTableRow>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int columnCount  
      protected java.util.SortedMap<org.snmp4j.smi.OID,R> rows  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      R addRow​(R row)  
      boolean containsRow​(org.snmp4j.smi.OID index)
      Checks whether this table model contains a row with the specified index.
      void dump​(java.io.OutputStream os)
      Dumps a textual representation of the table model content to the specified OutputStream.
      org.snmp4j.smi.OID firstIndex​()
      Returns the first row index in this model.
      R firstRow​()
      Returns the first row contained in this model.
      int getColumnCount​()
      Returns the number of columns currently in this table model.
      R getRow​(org.snmp4j.smi.OID index)
      Gets the row with the specified index.
      int getRowCount​()
      Returns the number of rows currently in this table model.
      boolean isEmpty​()
      Returns true if the table model contains no rows.
      java.util.Iterator<R> iterator​()
      Returns an iterator over the rows in this table model.
      org.snmp4j.smi.OID lastIndex​()
      Returns the last row index in this model.
      R lastRow​()
      Returns the last row contained in this model.
      java.util.Iterator<R> tailIterator​(org.snmp4j.smi.OID lowerBound)
      Returns an iterator on a view of the rows of this table model whose index values are greater or equal lowerBound.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rows

        protected java.util.SortedMap<org.snmp4j.smi.OID,R extends MOTableRow> rows
      • columnCount

        protected int columnCount
    • Constructor Detail

      • DefaultMOTableModel

        public DefaultMOTableModel​()
    • Method Detail

      • addRow

        public R addRow​(R row)
      • getColumnCount

        public int getColumnCount​()
        Description copied from interface: MOTableModel
        Returns the number of columns currently in this table model.
        Specified by:
        getColumnCount in interface MOTableModel<R extends MOTableRow>
        Returns:
        the number of columns.
      • getRowCount

        public int getRowCount​()
        Description copied from interface: MOTableModel
        Returns the number of rows currently in this table model.
        Specified by:
        getRowCount in interface MOTableModel<R extends MOTableRow>
        Returns:
        the number of rows.
      • isEmpty

        public boolean isEmpty​()
        Description copied from interface: MOTableModel
        Returns true if the table model contains no rows.
        Specified by:
        isEmpty in interface MOTableModel<R extends MOTableRow>
        Returns:
        true if the table model contains no rows.
      • getRow

        public R getRow​(org.snmp4j.smi.OID index)
        Description copied from interface: MOTableModel
        Gets the row with the specified index.
        Specified by:
        getRow in interface MOTableModel<R extends MOTableRow>
        Parameters:
        index - the row index.
        Returns:
        the MOTableRow with the specified index and null if no such row exists.
      • firstIndex

        public org.snmp4j.smi.OID firstIndex​()
        Description copied from interface: MOTableModel
        Returns the first row index in this model.
        Specified by:
        firstIndex in interface MOTableModel<R extends MOTableRow>
        Returns:
        the first index OID of this model.
      • iterator

        public java.util.Iterator<R> iterator​()
        Description copied from interface: MOTableModel
        Returns an iterator over the rows in this table model.
        Specified by:
        iterator in interface MOTableModel<R extends MOTableRow>
        Returns:
        an Iterator returning MOTableRow instances.
      • firstRow

        public R firstRow​()
        Description copied from interface: MOTableModel
        Returns the first row contained in this model.
        Specified by:
        firstRow in interface MOTableModel<R extends MOTableRow>
        Returns:
        the MOTableRow with the smallest index or null if the model is empty.
      • lastIndex

        public org.snmp4j.smi.OID lastIndex​()
        Description copied from interface: MOTableModel
        Returns the last row index in this model.
        Specified by:
        lastIndex in interface MOTableModel<R extends MOTableRow>
        Returns:
        the last index OID of this model.
      • lastRow

        public R lastRow​()
        Description copied from interface: MOTableModel
        Returns the last row contained in this model.
        Specified by:
        lastRow in interface MOTableModel<R extends MOTableRow>
        Returns:
        the MOTableRow with the greatest index or null if the model is empty.
      • containsRow

        public boolean containsRow​(org.snmp4j.smi.OID index)
        Description copied from interface: MOTableModel
        Checks whether this table model contains a row with the specified index.
        Specified by:
        containsRow in interface MOTableModel<R extends MOTableRow>
        Parameters:
        index - the index OID of the row to search.
        Returns:
        true if this model has a row of with index index or false otherwise.
      • tailIterator

        public java.util.Iterator<R> tailIterator​(org.snmp4j.smi.OID lowerBound)
        Description copied from interface: MOTableModel
        Returns an iterator on a view of the rows of this table model whose index values are greater or equal lowerBound.
        Specified by:
        tailIterator in interface MOTableModel<R extends MOTableRow>
        Parameters:
        lowerBound - the lower bound index (inclusive). If lowerBound is null the returned iterator is the same as returned by MOTableModel.iterator().
        Returns:
        an Iterator over the
      • dump

        public void dump​(java.io.OutputStream os)
                  throws java.io.IOException
        Dumps a textual representation of the table model content to the specified OutputStream.
        Parameters:
        os - an OutputStream to write the model content to.
        Throws:
        java.io.IOException - if a write operation on os fails with an IO exception.
        Since:
        1.2.2