|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
mapping.data.IDsQueue<Item>
Item
- The Type of objects stored in this Queuepublic class IDsQueue<Item>
This class is an implementation of a queue (queue to hold the IDs of Servers). It also implements AbstractTableModel to be used by a JTable to show the servers that this queue has their IDs.
Constructor Summary | |
---|---|
IDsQueue()
Default constructor |
|
IDsQueue(Mapper mapper)
|
Method Summary | |
---|---|
void |
advanceInRoundRobinFashion()
This method dequeue one element and enqueue it again. |
Item |
dequeue()
remove and return the least recently added item |
void |
enqueue(Item item)
This method is used to add nodes to the queue. |
int |
getColumnCount()
|
java.lang.String |
getColumnName(int column)
|
int |
getRowCount()
|
Item |
getVal(int row)
|
java.lang.Object |
getValueAt(int row,
int column)
This method is part of the implementation of the AbstractTableModel interface. |
boolean |
isEmpty()
|
static void |
main(java.lang.String[] args)
|
Item |
peak()
|
void |
print()
|
void |
printServers()
|
Item |
remove(Item item)
This method remove the object Item if it exists |
void |
setValueAt(java.lang.Object value,
int row,
int column)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDsQueue()
public IDsQueue(Mapper mapper)
mapper
- to set the mapper fieldMethod Detail |
---|
public void printServers()
public void enqueue(Item item)
item
- is the item to be addedpublic Item dequeue()
public Item peak()
public Item getVal(int row)
public Item remove(Item item)
item
- the object to be deleted
public boolean isEmpty()
public void print()
public void advanceInRoundRobinFashion()
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
AbstractTableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
AbstractTableModel
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
AbstractTableModel
public java.lang.Object getValueAt(int row, int column)
getValueAt
in interface javax.swing.table.TableModel
AbstractTableModel
public void setValueAt(java.lang.Object value, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |