-
- All Known Subinterfaces:
MOMutableTableModel<R>
- All Known Implementing Classes:
DefaultMOMutableTableModel,DefaultMOTableModel,UsmMIB.UsmTableModel
public interface MOTableModel<R extends MOTableRow>TheMOTableModelinterface defines the base table model interface needed forMOTables. This model can be used for read-only and read-write SNMP conceptual tables. For read-create tables theMOMutableTableModelshould be used instead.- Version:
- 1.0
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsRow(org.snmp4j.smi.OID index)Checks whether this table model contains a row with the specified index.org.snmp4j.smi.OIDfirstIndex()Returns the first row index in this model.RfirstRow()Returns the first row contained in this model.intgetColumnCount()Returns the number of columns currently in this table model.RgetRow(org.snmp4j.smi.OID index)Gets the row with the specified index.intgetRowCount()Returns the number of rows currently in this table model.booleanisEmpty()Returnstrueif the table model contains no rows.Iterator<R>iterator()Returns an iterator over the rows in this table model.org.snmp4j.smi.OIDlastIndex()Returns the last row index in this model.RlastRow()Returns the last row contained in this model.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 equallowerBound.
-
-
-
Method Detail
-
getColumnCount
int getColumnCount()
Returns the number of columns currently in this table model.- Returns:
- the number of columns.
-
getRowCount
int getRowCount()
Returns the number of rows currently in this table model.- Returns:
- the number of rows.
-
isEmpty
boolean isEmpty()
Returnstrueif the table model contains no rows.- Returns:
trueif the table model contains no rows.- Since:
- 2.2
-
containsRow
boolean containsRow(org.snmp4j.smi.OID index)
Checks whether this table model contains a row with the specified index.- Parameters:
index- the index OID of the row to search.- Returns:
trueif this model has a row of with indexindexorfalseotherwise.
-
getRow
R getRow(org.snmp4j.smi.OID index)
Gets the row with the specified index.- Parameters:
index- the row index.- Returns:
- the
MOTableRowwith the specified index andnullif no such row exists.
-
iterator
Iterator<R> iterator()
Returns an iterator over the rows in this table model.- Returns:
- an
IteratorreturningMOTableRowinstances.
-
tailIterator
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 equallowerBound.- Parameters:
lowerBound- the lower bound index (inclusive). IflowerBoundisnullthe returned iterator is the same as returned byiterator().- Returns:
- an
Iteratorover the
-
lastIndex
org.snmp4j.smi.OID lastIndex()
Returns the last row index in this model.- Returns:
- the last index OID of this model.
-
firstIndex
org.snmp4j.smi.OID firstIndex()
Returns the first row index in this model.- Returns:
- the first index OID of this model.
-
firstRow
R firstRow()
Returns the first row contained in this model.- Returns:
- the
MOTableRowwith the smallest index ornullif the model is empty.
-
lastRow
R lastRow()
Returns the last row contained in this model.- Returns:
- the
MOTableRowwith the greatest index ornullif the model is empty.
-
-