Package org.gnome.glib
Enum Class FormatSizeFlags
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<FormatSizeFlags>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum FormatSizeFlags
extends Enum<FormatSizeFlags>
implements Enumeration
Flags to modify the format of the string returned by g_format_size_full().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionset the size as a quantity in bits, rather than bytes, and return units in bits.behave the same as g_format_size()use IEC (base 1024) units with "KiB"-style suffixes.include the exact number of bytes as part of the returned string.return only unit, without value; this should not be used together withGFORMATSIZELONGFORMAT
norGFORMATSIZEONLYVALUE
.return only value, without unit; this should not be used together withGFORMATSIZELONGFORMAT
norGFORMATSIZEONLYUNIT
. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic FormatSizeFlags
of
(int value) Create a new FormatSizeFlags for the provided valuestatic FormatSizeFlags
Returns the enum constant of this class with the specified name.static FormatSizeFlags[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
behave the same as g_format_size() -
LONG_FORMAT
include the exact number of bytes as part of the returned string. For example, "45.6 kB (45,612 bytes)". -
IEC_UNITS
use IEC (base 1024) units with "KiB"-style suffixes. IEC units should only be used for reporting things with a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. Network and storage sizes should be reported in the normal SI units. -
BITS
set the size as a quantity in bits, rather than bytes, and return units in bits. For example, ‘Mbit’ rather than ‘MB’. -
ONLY_VALUE
return only value, without unit; this should not be used together withGFORMATSIZELONGFORMAT
norGFORMATSIZEONLYUNIT
. Since: 2.74 -
ONLY_UNIT
return only unit, without value; this should not be used together withGFORMATSIZELONGFORMAT
norGFORMATSIZEONLYVALUE
. Since: 2.74
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new FormatSizeFlags for the provided value- Parameters:
value
- the bitfield value- Returns:
- the bitfield for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-