Top Description Fields Constructors Methods
net.java.games.input

public final Class EventQueue

extends Object
Class Inheritance

A FIFO queue for input events.

Field Summary

Modifier and TypeField and Description
private int
private final Event[]
private int

Constructor Summary

AccessConstructor and Description
public
EventQueue(int size)

This is an internal method and should not be called by applications using the API

Method Summary

Modifier and TypeMethod and Description
pack-priv synchronized void
add(Event event)

This is an internal method and should not be called by applications using the API

public synchronized boolean

Returns:

false if there were no events left on the queue, otherwise true.
getNextEvent
(Event
The event to populate
event
)

Populates the provided event with the details of the event on the head of the queue.

private int
increase(int x)

This is an internal method and should not be called by applications using the API

pack-priv synchronized boolean

Returns:

true if the queue is full
isFull
()

Check if the queue is full

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

queueback to summary
private final Event[] queue
tailback to summary
private int tail

Constructor Detail

EventQueueback to summary
public EventQueue(int size)

This is an internal method and should not be called by applications using the API

Method Detail

addback to summary
pack-priv synchronized void add(Event event)

This is an internal method and should not be called by applications using the API

getNextEventback to summary
public synchronized boolean getNextEvent(Event event)

Populates the provided event with the details of the event on the head of the queue.

Parameters
event:Event

The event to populate

Returns:boolean

false if there were no events left on the queue, otherwise true.

increaseback to summary
private int increase(int x)

This is an internal method and should not be called by applications using the API

isFullback to summary
pack-priv synchronized boolean isFull()

Check if the queue is full

Returns:boolean

true if the queue is full