org.jnetpcap.protocol.tcpip
Enum TcpDuplexStream.Direction
java.lang.Object
java.lang.Enum<TcpDuplexStream.Direction>
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>
| 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 |
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
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