- All Implemented Interfaces:
Serializable
,Comparable<WinPcapMode>
,Constable
,IntSupplier
WinPcap setmode values.
- Author:
- Sly Technologies Inc, repos@slytechs.com, mark
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
Gets WinPcap mode as numerical constant.static Optional
<WinPcapMode> toEnum
(int mode) Converts numerical WinPcap mode constant to an enum, if found.static WinPcapMode
valueOf
(int mode) Converts numerical WinPcap mode constant to an enum.static WinPcapMode
Returns the enum constant of this class with the specified name.static WinPcapMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CAPT
The CAPTURE mode constant. -
STAT
The STATISTICS mode constant. -
MON
The MONITOR mode constant.
-
-
Field Details
-
MODE_CAPT
public static final int MODE_CAPTThe Constant MODE_CAPT.- See Also:
-
MODE_STAT
public static final int MODE_STATThe Constant MODE_STAT.- See Also:
-
MODE_MON
public static final int MODE_MONThe Constant MODE_MON.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Converts numerical WinPcap mode constant to an enum.- Parameters:
mode
- the PCAP integer mode constant- Returns:
- the pcap mode constant
- Throws:
IllegalArgumentException
- thrown if not found
-
toEnum
Converts numerical WinPcap mode constant to an enum, if found.- Parameters:
mode
- the WinPcap mode constant- Returns:
- the optional enum constant
-
getAsInt
public int getAsInt()Gets WinPcap mode as numerical constant.- Specified by:
getAsInt
in interfaceIntSupplier
- Returns:
- the WinPcap mode numerical constant
- See Also:
-