Public Methods | |
NodeQueue () | |
boolean | isEmpty () |
void | put (Object packet) |
Object | get () |
Object | peek () |
Private Attributes | |
Stack | storage_buffer = new Stack() |
Definition at line 311 of file Node.java.
|
Default constructor. Definition at line 320 of file Node.java. 00321 { 00322 } |
|
Gets next element (packet) and removes it from the buffer. Generates exception if buffer is empty.
Definition at line 350 of file Node.java. Referenced by Node::transmitAll().
00351 { 00352 Object packet; 00353 00354 packet = storage_buffer.pop(); 00355 return packet; 00356 } |
|
Test for empty buffer. Returns true if empty.
Definition at line 329 of file Node.java. Referenced by Node::transmitAll().
00330 { 00331 return storage_buffer.isEmpty(); 00332 } |
|
Peeks at the first element.
Definition at line 363 of file Node.java. 00364 { 00365 return storage_buffer.peek(); 00366 } |
|
Puts one packet in the buffer.
Definition at line 339 of file Node.java. Referenced by Node::receive().
00340 { 00341 storage_buffer.push(packet); 00342 } |
|
Packet storage. |