public enum SerialParity extends Enum<SerialParity>
| Enum Constant and Description |
|---|
Even
An even parity bit will be sent with each data character, i.e.
|
Mark
A 1 parity bit will be sent with each data character.
|
None
No parity bit will be sent with each data character at all.
|
Odd
An odd parity bit will be sent with each data character, i.e.
|
Space
A 0 parity bit will be sent with each data character.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
EVEN_PARITY
Code value for even parity.
|
static String |
EVEN_PARITY_ABBREVIATION
Abbreviation value for even parity.
|
static int |
MARK_PARITY
Code value for mark parity.
|
static String |
MARK_PARITY_ABBREVIATION
Abbreviation value for mark parity.
|
static int |
NO_PARITY
Code value for no parity.
|
static String |
NO_PARITY_ABBREVIATION
Abbreviation value for no parity.
|
static int |
ODD_PARITY
Code value for odd parity.
|
static String |
ODD_PARITY_ABBREVIATION
Abbreviation value for odd parity.
|
static int |
SPACE_PARITY
Code value for space parity.
|
static String |
SPACE_PARITY_ABBREVIATION
Abbreviation value for space parity.
|
| Modifier and Type | Method and Description |
|---|---|
static SerialParity |
forAbbreviation(String abbreviation)
Get an enum instance for an abbreviation value.
|
static SerialParity |
forCode(int code)
Get an enum instance for a code value.
|
String |
getAbbreviation()
Get an abbreviation for this parity.
|
int |
getCode()
Get the code value.
|
static SerialParity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SerialParity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SerialParity None
public static final SerialParity Odd
public static final SerialParity Even
public static final SerialParity Mark
public static final SerialParity Space
public static final int NO_PARITY
public static final int ODD_PARITY
public static final int EVEN_PARITY
public static final int MARK_PARITY
public static final int SPACE_PARITY
public static final String NO_PARITY_ABBREVIATION
public static final String ODD_PARITY_ABBREVIATION
public static final String EVEN_PARITY_ABBREVIATION
public static final String MARK_PARITY_ABBREVIATION
public static final String SPACE_PARITY_ABBREVIATION
public static SerialParity[] values()
for (SerialParity c : SerialParity.values()) System.out.println(c);
public static SerialParity valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getCode()
public String getAbbreviation()
public static SerialParity forCode(int code)
code - the codeIllegalArgumentException - if code is not a valid valuepublic static SerialParity forAbbreviation(String abbreviation)
The supported abbreviations are N, O, E, M, and S for None, Odd, Even, Mark, and Space. Lower-case versions of these are supported.
abbreviation - the abbreviationIllegalArgumentException - if code is not a valid value