public class DefaultMOTableModel<R extends MOTableRow> extends Object implements MOTableModel<R>
| Modifier and Type | Field and Description |
|---|---|
protected int |
columnCount |
protected SortedMap<org.snmp4j.smi.OID,R> |
rows |
| Constructor and Description |
|---|
DefaultMOTableModel() |
| Modifier and Type | Method and 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(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. |
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.
|
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. |
protected SortedMap<org.snmp4j.smi.OID,R extends MOTableRow> rows
protected int columnCount
public int getColumnCount()
MOTableModelgetColumnCount in interface MOTableModel<R extends MOTableRow>public int getRowCount()
MOTableModelgetRowCount in interface MOTableModel<R extends MOTableRow>public boolean isEmpty()
MOTableModeltrue if the table model contains no rows.isEmpty in interface MOTableModel<R extends MOTableRow>true if the table model contains no rows.public R getRow(org.snmp4j.smi.OID index)
MOTableModelgetRow in interface MOTableModel<R extends MOTableRow>index - the row index.MOTableRow with the specified index and
null if no such row exists.public org.snmp4j.smi.OID firstIndex()
MOTableModelfirstIndex in interface MOTableModel<R extends MOTableRow>public Iterator<R> iterator()
MOTableModeliterator in interface MOTableModel<R extends MOTableRow>Iterator returning MOTableRow instances.public R firstRow()
MOTableModelfirstRow in interface MOTableModel<R extends MOTableRow>MOTableRow with the smallest index or null
if the model is empty.public org.snmp4j.smi.OID lastIndex()
MOTableModellastIndex in interface MOTableModel<R extends MOTableRow>public R lastRow()
MOTableModellastRow in interface MOTableModel<R extends MOTableRow>MOTableRow with the greatest index or null
if the model is empty.public boolean containsRow(org.snmp4j.smi.OID index)
MOTableModelcontainsRow in interface MOTableModel<R extends MOTableRow>index - the index OID of the row to search.true if this model has a row of with index
index or false otherwise.public Iterator<R> tailIterator(org.snmp4j.smi.OID lowerBound)
MOTableModellowerBound.tailIterator in interface MOTableModel<R extends MOTableRow>lowerBound - the lower bound index (inclusive). If lowerBound is
null the returned iterator is the same as returned by
MOTableModel.iterator().Iterator over thepublic void dump(OutputStream os) throws IOException
OutputStream.os - an OutputStream to write the model content to.IOException - if a write operation on os fails with an IO exception.Copyright © 2020 SNMP4J.org. All rights reserved.