cz.cuni.amis.pogamut.ut2004.utils
Enum LinkFlag

java.lang.Object
  extended by java.lang.Enum<LinkFlag>
      extended by cz.cuni.amis.pogamut.ut2004.utils.LinkFlag
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LinkFlag>

public enum LinkFlag
extends java.lang.Enum<LinkFlag>

This is enum for edge flag between navpoints.
Each navpoint has a list of neighbour navpoints (getOutgoingEdges()), each edge (NavPointNeighbourLink instance) has also property flag (getFlag())
Here is the list of respective bits according to http://wiki.beyondunreal.com/wiki/ReachSpec

Use getFlags() to obtain the list of enums from a particular integer.


Enum Constant Summary
DOOR
           
FLY
           
FORCED
           
JUMP
           
LADDER
           
PLAYERONLY
           
PROSCRIBED
           
SPECIAL
           
SWIM
           
WALK
           
 
Method Summary
 int get()
          Returns integer of the flag.
static java.util.ArrayList<LinkFlag> getFlags(int flags)
          Returns list of flags, which are raised.
static java.lang.String getFlagsString(int flags)
           
 boolean isSet(int flag)
           
static LinkFlag valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LinkFlag[] 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

WALK

public static final LinkFlag WALK

FLY

public static final LinkFlag FLY

SWIM

public static final LinkFlag SWIM

JUMP

public static final LinkFlag JUMP

DOOR

public static final LinkFlag DOOR

SPECIAL

public static final LinkFlag SPECIAL

LADDER

public static final LinkFlag LADDER

PROSCRIBED

public static final LinkFlag PROSCRIBED

FORCED

public static final LinkFlag FORCED

PLAYERONLY

public static final LinkFlag PLAYERONLY
Method Detail

values

public static LinkFlag[] 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 (LinkFlag c : LinkFlag.values())
    System.out.println(c);

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

valueOf

public static LinkFlag valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

get

public int get()
Returns integer of the flag.


isSet

public boolean isSet(int flag)
Parameters:
flag -
Returns:
whether the flag is raised.

getFlags

public static java.util.ArrayList<LinkFlag> getFlags(int flags)
Returns list of flags, which are raised.

Parameters:
flags -
Returns:
list of raised flags

getFlagsString

public static java.lang.String getFlagsString(int flags)