Enum Info |
|---|
public enum SupportedUnit Distance unit enumeration class. |
Qualifier and Type | Method Name and Description |
|---|---|
int | getCode() Obtains the current distance unit code. |
static SupportedUnit | getByCode(Integer unit) Obtains the enumeration type based on the passed value. |
static boolean | isSameUnit(int commonUnit, UnitEnum unit) Checks whether two passed enumeration values are the same. |
Method |
|---|
public int getCode() Obtains the current distance unit code. |
Returns
Type | Description |
|---|---|
int | Current distance unit code. |
Method |
|---|
public static SupportedUnit getByCode(Integer unit) Obtains the enumeration type based on the passed enumeration value. |
Parameters
Name | Description |
|---|---|
unit | Passed enumeration value. |
Returns
Type | Description |
|---|---|
Enumeration type. |
Method |
|---|
public static boolean isSameUnit(int commonUnit, UnitEnum unit) Checks whether two passed enumeration values are the same. |
Parameters
Name | Description |
|---|---|
commonUnit | Measurement unit. The options include METRIC(0) and IMPERIAL(1). |
unit | Enumerated units. |
Returns
Type | Description |
|---|---|
boolean | Whether the two enumeration values are the same. |