home *** CD-ROM | disk | FTP | other *** search
- import java.util.Vector;
-
- class CommandBuffer {
- private Vector m_vCommand = new Vector();
-
- public synchronized void putCommand(WhCommand var1) {
- this.m_vCommand.addElement(var1);
- }
-
- public synchronized WhCommand getCommand() {
- if (this.m_vCommand.size() > 0) {
- WhCommand var1 = (WhCommand)this.m_vCommand.elementAt(0);
- this.m_vCommand.removeElementAt(0);
- return var1;
- } else {
- return null;
- }
- }
- }
-