cz.cuni.amis.pogamut.defcon.consts
Enum Event

Package class diagram package Event
java.lang.Object
  extended by java.lang.Enum<Event>
      extended by cz.cuni.amis.pogamut.defcon.consts.Event
All Implemented Interfaces:
Serializable, Comparable<Event>

public enum Event
extends Enum<Event>

Contains all types of defcon events and supplies user with a factory method for each of them. GENERATED by EventFactoryGenerator.xslt so any modifications should go there!!!

Author:
Radek 'Black_Hand' Pibil

Enum Constant Summary
CEASED_FIRE
           
DESTROYED
           
HIT
           
NEW_VOTE
           
NUKE_LAUNCH_SILO
           
NUKE_LAUNCH_SUB
           
PING_CARRIER
           
PING_DETECTION
           
PING_SUB
           
SHARED_RADAR
           
TEAM_RETRACTED_VOTE
           
TEAM_VOTED
           
UNCEASED_FIRE
           
UNSHARED_RADAR
           
VOTE_FINISHED_NO
           
VOTE_FINISHED_YES
           
 
Field Summary
 int id
          Holds integer (defcon) event type of this event..type.
 
Method Summary
static Event getEnum(int eventId)
          Returns appropriate Event for given integer.
static DefConEvent getInstanceOfUnitTypeFromEventType(JBot.EventData data, double time)
          Factory styled method, which provides you with an appropriate instance of event object based on the given EventData data.
static Event valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Event[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PING_SUB

public static final Event PING_SUB

PING_CARRIER

public static final Event PING_CARRIER

NUKE_LAUNCH_SILO

public static final Event NUKE_LAUNCH_SILO

NUKE_LAUNCH_SUB

public static final Event NUKE_LAUNCH_SUB

HIT

public static final Event HIT

DESTROYED

public static final Event DESTROYED

PING_DETECTION

public static final Event PING_DETECTION

CEASED_FIRE

public static final Event CEASED_FIRE

UNCEASED_FIRE

public static final Event UNCEASED_FIRE

SHARED_RADAR

public static final Event SHARED_RADAR

UNSHARED_RADAR

public static final Event UNSHARED_RADAR

NEW_VOTE

public static final Event NEW_VOTE

TEAM_VOTED

public static final Event TEAM_VOTED

TEAM_RETRACTED_VOTE

public static final Event TEAM_RETRACTED_VOTE

VOTE_FINISHED_YES

public static final Event VOTE_FINISHED_YES

VOTE_FINISHED_NO

public static final Event VOTE_FINISHED_NO
Field Detail

id

public final int id
Holds integer (defcon) event type of this event..type.

Method Detail

values

public static Event[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Event c : Event.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Event valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getEnum

public static Event getEnum(int eventId)
Returns appropriate Event for given integer.

Parameters:
eventId - integer (defcon) event type
Returns:
Event type

getInstanceOfUnitTypeFromEventType

public static DefConEvent getInstanceOfUnitTypeFromEventType(JBot.EventData data,
                                                             double time)
Factory styled method, which provides you with an appropriate instance of event object based on the given EventData data.

Parameters:
data - event data
time - time of creation
Returns:
instantiated defcon event


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.