Blackjack

com.amoebacode.blackjack.display.action
Class ActionQueue

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.action.ActionQueue

public class ActionQueue
extends java.lang.Object

ActionQueue manages a list of display actions, performing them in a first in, first out sequence.

Version:
0.9
Author:
Jason Gurney

Field Summary
private  java.util.List actions
          The list of actions currently queued
private  boolean isProcessing
          Indicates whether the queue is currently processing
 
Constructor Summary
ActionQueue()
          Default public constructor.
 
Method Summary
private  void processQueue()
          Removes and performs the first action from the queue.
 void queueAction(QueueableAction action)
          Adds the specified action to the queue and begins processing.
 void resumeQueue()
          Resumes processing the queue (called when the last action has finished).
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

actions

private java.util.List actions
The list of actions currently queued

isProcessing

private boolean isProcessing
Indicates whether the queue is currently processing
Constructor Detail

ActionQueue

public ActionQueue()
Default public constructor.
Method Detail

queueAction

public void queueAction(QueueableAction action)
Adds the specified action to the queue and begins processing.
Parameters:
action - the QueueableAction to add

resumeQueue

public void resumeQueue()
Resumes processing the queue (called when the last action has finished).

processQueue

private void processQueue()
Removes and performs the first action from the queue.

Blackjack

Copyright © 2002 amoebacode.com.