arche
Class Queue

java.lang.Object
  |
  +--arche.Storage
        |
        +--arche.Queue

public class Queue
extends Storage

Queue as a structural element for processors. There is no error checking, you can read more than you actually have put. Of course the values will be periodical.


Field Summary
private  byte p1
          The pointers.
private  byte p2
          The pointers.
private  short[] queue
           
private  byte size
           
 
Constructor Summary
Queue(int size_)
           
 
Method Summary
 void clear()
           
 int getSize()
          Returns the number of cells inside the storage.
 short read()
           
 void write(short newvalue)
          Sets the content to a new value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

size

private byte size

queue

private short[] queue

p1

private byte p1
The pointers. P1 for the first put, and P2 for the last put.

p2

private byte p2
The pointers. P1 for the first put, and P2 for the last put.
Constructor Detail

Queue

public Queue(int size_)
Method Detail

getSize

public int getSize()
Description copied from class: Storage
Returns the number of cells inside the storage. It's 1 for registers.
Overrides:
getSize in class Storage

read

public short read()
Overrides:
read in class Storage

write

public void write(short newvalue)
Sets the content to a new value.
Overrides:
write in class Storage

clear

public void clear()
Overrides:
clear in class Storage