JXTA

net.jxta.impl.protocol
Enum LimitedRangeRdvMsg.WalkDirection

java.lang.Object
  extended by java.lang.Enum<LimitedRangeRdvMsg.WalkDirection>
      extended by net.jxta.impl.protocol.LimitedRangeRdvMsg.WalkDirection
All Implemented Interfaces:
Serializable, Comparable<LimitedRangeRdvMsg.WalkDirection>
Enclosing class:
LimitedRangeRdvMsg

public static enum LimitedRangeRdvMsg.WalkDirection
extends Enum<LimitedRangeRdvMsg.WalkDirection>

Enumeration of possible walk directions.


Enum Constant Summary
BOTH
           
DOWN
           
UP
           
 
Method Summary
 int toProtocolCode()
          Return the protocol code used by the standard walker protocol for this WalkDirection.
static LimitedRangeRdvMsg.WalkDirection toWalkDirection(int code)
          Convert a walk code as used by the standard walker protocol to a direction object.
static LimitedRangeRdvMsg.WalkDirection valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LimitedRangeRdvMsg.WalkDirection[] 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

UP

public static final LimitedRangeRdvMsg.WalkDirection UP

DOWN

public static final LimitedRangeRdvMsg.WalkDirection DOWN

BOTH

public static final LimitedRangeRdvMsg.WalkDirection BOTH
Method Detail

values

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

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

valueOf

public static LimitedRangeRdvMsg.WalkDirection 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

toWalkDirection

public static LimitedRangeRdvMsg.WalkDirection toWalkDirection(int code)
Convert a walk code as used by the standard walker protocol to a direction object.

Parameters:
code - the protocol code
Returns:
A direction object.
Throws:
IllegalArgumentException - For illegal protocol codes.

toProtocolCode

public int toProtocolCode()
Return the protocol code used by the standard walker protocol for this WalkDirection.

Returns:
the walk direction as a numeric value for use in protocol messages.

JXSE