Package org.gnome.glib
Enum Class FormatSizeFlags
- All Implemented Interfaces:
Serializable,Comparable<FormatSizeFlags>,Constable,Enumeration
@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 ConstantsEnum 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 withGFORMATSIZELONGFORMATnorGFORMATSIZEONLYVALUE.Since: 2.74return only value, without unit; this should not be used together withGFORMATSIZELONGFORMATnorGFORMATSIZEONLYUNIT.Since: 2.74 -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()Get the numeric value of this enumstatic Set<FormatSizeFlags> of(int flags) Create a newEnumSet<FormatSizeFlags>for the provided bitfieldstatic Set<FormatSizeFlags> of(MemorySegment address) Create a newEnumSet<FormatSizeFlags>for the bitfield in the provided memory address.static FormatSizeFlagsReturns 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 withGFORMATSIZELONGFORMATnorGFORMATSIZEONLYUNIT.Since: 2.74 -
ONLY_UNIT
return only unit, without value; this should not be used together withGFORMATSIZELONGFORMATnorGFORMATSIZEONLYVALUE.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
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValuein interfaceEnumeration- Returns:
- the enum value
-
of
Create a newEnumSet<FormatSizeFlags>for the provided bitfield- Parameters:
flags- the FormatSizeFlags bitfield- Returns:
- the EnumSet for the provided bitfield
-
of
Create a newEnumSet<FormatSizeFlags>for the bitfield in the provided memory address.- Parameters:
address- the memory address holding a bitfield value- Returns:
- the EnumSet for the bitfield in the provided memory address
-