Enum BaseUnit
- All Implemented Interfaces:
Serializable,Comparable<BaseUnit>
Represents unit which is used to access FRU
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the code of the unit.intgetSize()Returns the size of the unit in bytes.static BaseUnitparseInt(int value) Returns the unit of an access type bit.static BaseUnitReturns the enum constant of this type with the specified name.static BaseUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Bytes
The device is accessed by bytes. -
Words
The device is accessed by 16-bit words: Read FRU Data takes its offset in words.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()Returns the code of the unit.- Returns:
- the access type bit of Get FRU Inventory Area Info: 0 for bytes, 1 for words
-
parseInt
Returns the unit of an access type bit.- Parameters:
value- the access type bit of Get FRU Inventory Area Info- Returns:
- the matching unit
- Throws:
IllegalArgumentException- when the value is neither 0 nor 1
-
getSize
public int getSize()Returns the size of the unit in bytes.
-