Package org.eclipse.mat.query
Enum BytesDisplay
- All Implemented Interfaces:
Serializable
,Comparable<BytesDisplay>
,java.lang.constant.Constable
This enumeration specifies how to display a number of bytes. It can be
configured using -Dbytes_display=(bytes|kilobytes|megabytes|gigabytes|smart)
or through the Eclipse preferences dialog.
- Since:
- 1.5
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUnits of bytes (8 bits).Units of gigabytes (1,073,741,824 bytes).Units of kilobytes (1,024 bytes).Units of megabytes (1,048,576 bytes).If the value is a gigabyte or more, display in gigabytes; similarly for megabytes and kilobytes; otherwise, display in bytes. -
Field Summary
Modifier and TypeFieldDescriptionstatic final BytesDisplay
Default bytes display format.static final String
System property name to specify a bytes display. -
Method Summary
Modifier and TypeMethodDescriptionstatic BytesDisplay
Return the currently selected preference from the system properties.static BytesDisplay
Given a stored preference value, return the enumeration value, or otherwise the default.static void
Uses system properties to set the current value.static BytesDisplay
Returns the enum constant of this type with the specified name.static BytesDisplay[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
Bytes
Units of bytes (8 bits). -
Kilobytes
Units of kilobytes (1,024 bytes). -
Megabytes
Units of megabytes (1,048,576 bytes). -
Gigabytes
Units of gigabytes (1,073,741,824 bytes). -
Smart
If the value is a gigabyte or more, display in gigabytes; similarly for megabytes and kilobytes; otherwise, display in bytes.
-
-
Field Details
-
DEFAULT
Default bytes display format. -
PROPERTY_NAME
System property name to specify a bytes display.- See Also:
-
-
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
-
parse
Given a stored preference value, return the enumeration value, or otherwise the default.- Parameters:
value
- The preference value.- Returns:
- Given a stored preference value, return the enumeration value, or otherwise the default.
-
getCurrentValue
Return the currently selected preference from the system properties.- Returns:
- Current preference or reflection of command line setting.
-
setCurrentValue
Uses system properties to set the current value.- Parameters:
val
- The new value.
-