net.java.games.input
Class EventQueue

java.lang.Object
  extended by net.java.games.input.EventQueue

public final class EventQueue
extends java.lang.Object

A FIFO queue for input events.


Constructor Summary
EventQueue(int size)
          This is an internal method and should not be called by applications using the API
 
Method Summary
(package private)  void add(Event event)
          This is an internal method and should not be called by applications using the API
 boolean getNextEvent(Event event)
          Populates the provided event with the details of the event on the head of the queue.
(package private)  boolean isFull()
          Check if the queue is full
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventQueue

public EventQueue(int size)
This is an internal method and should not be called by applications using the API

Method Detail

add

final void add(Event event)
This is an internal method and should not be called by applications using the API


isFull

final boolean isFull()
Check if the queue is full

Returns:
true if the queue is full

getNextEvent

public final boolean getNextEvent(Event event)
Populates the provided event with the details of the event on the head of the queue.

Parameters:
event - The event to populate
Returns:
false if there were no events left on the queue, otherwise true.