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

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

public enum LinkFlag
extends 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 ArrayList<LinkFlag> getFlags(int flags)
          Returns list of flags, which are raised.
static String getFlagsString(int flags)
           
 boolean isSet(int flag)
           
static LinkFlag valueOf(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(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

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 ArrayList<LinkFlag> getFlags(int flags)
Returns list of flags, which are raised.

Parameters:
flags -
Returns:
list of raised flags

getFlagsString

public static String getFlagsString(int flags)


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