org.jnetpcap.protocol.tcpip
Enum TcpDuplexStream.Direction

java.lang.Object
  extended by java.lang.Enum<TcpDuplexStream.Direction>
      extended by org.jnetpcap.protocol.tcpip.TcpDuplexStream.Direction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TcpDuplexStream.Direction>
Enclosing class:
TcpDuplexStream

public static enum TcpDuplexStream.Direction
extends java.lang.Enum<TcpDuplexStream.Direction>


Enum Constant Summary
BOTH
           
CLIENT
           
NONE
           
SERVER
           
 
Method Summary
 boolean equals(TcpDuplexStream.Direction dir)
          Provides a custom equals method, that takes into account the constant BOTH and always matches if compared against either in self or supplied parameter.
 TcpDuplexStream.Direction inverse()
          Returns the inverse constant of this one.
static TcpDuplexStream.Direction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TcpDuplexStream.Direction[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BOTH

public static final TcpDuplexStream.Direction BOTH

CLIENT

public static final TcpDuplexStream.Direction CLIENT

NONE

public static final TcpDuplexStream.Direction NONE

SERVER

public static final TcpDuplexStream.Direction SERVER
Method Detail

values

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

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

valueOf

public static TcpDuplexStream.Direction 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

equals

public boolean equals(TcpDuplexStream.Direction dir)
Provides a custom equals method, that takes into account the constant BOTH and always matches if compared against either in self or supplied parameter.

Parameters:
dir - direction to match
Returns:
true if directions are equal and always true matching against BOTH constant

inverse

public TcpDuplexStream.Direction inverse()
Returns the inverse constant of this one. If BOTH is the constant, then NONE is returned as its inverse.

Returns:
opposite meaning CONSTANT of this one