public enum OutOfRangeBehaviour extends Enum<OutOfRangeBehaviour>
In earlier versions of ST 1201, there was no description of what happened in the event that
the input value was beyond the range of the IMAP definition. For example, given IMAPB(-50.0, 5000.0, 3)
, what the code should do if the value to be encoded is -100.0, or
6000.0. Earlier jMISB implementations assumed that was an error, and throw an Exception.
As of ST 1201.5, there are special flag values for out-of-range indications. Those will be
used if the Default
behavior is selected.
This enumeration is used to modify the encoding to reflect the required outcome.
Enum Constant and Description |
---|
Default
Use default handling of out-of-range.
|
Throw
Throw exception.
|
Modifier and Type | Method and Description |
---|---|
static OutOfRangeBehaviour |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OutOfRangeBehaviour[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OutOfRangeBehaviour Default
Inputs that are beyond the valid range are flagged with ST 1201.5 special case values. Decode of those values will be clamped to the IMAP range (i.e. IMAP_ABOVE_MAXIMUM will be decoded as the maximum valid value, IMAP_BELOW_MINIMUM will be decoded as the minimum valid value).
public static final OutOfRangeBehaviour Throw
Inputs that are beyond the valid range will result in a Java level Exception, as noted in the API.
This is almost never what you want. It is retained for backwards behavioral compatibility.
public static OutOfRangeBehaviour[] values()
for (OutOfRangeBehaviour c : OutOfRangeBehaviour.values()) System.out.println(c);
public static OutOfRangeBehaviour 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 nullCopyright © 2022 West Ridge Systems. All rights reserved.