Enum Class FormatSizeFlags

java.lang.Object
java.lang.Enum<FormatSizeFlags>
org.gnome.glib.FormatSizeFlags
All Implemented Interfaces:
Serializable, Comparable<FormatSizeFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum FormatSizeFlags extends Enum<FormatSizeFlags> implements Enumeration
Flags to modify the format of the string returned by g_format_size_full().
  • Enum Constant Details

    • DEFAULT

      public static final FormatSizeFlags DEFAULT
      behave the same as g_format_size()
    • LONG_FORMAT

      public static final FormatSizeFlags LONG_FORMAT
      include the exact number of bytes as part of the returned string. For example, "45.6 kB (45,612 bytes)".
    • IEC_UNITS

      public static final FormatSizeFlags 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

      public static final FormatSizeFlags 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

      public static final FormatSizeFlags ONLY_VALUE
      return only value, without unit; this should not be used together with GFORMATSIZELONGFORMAT nor GFORMATSIZEONLYUNIT. Since: 2.74
    • ONLY_UNIT

      public static final FormatSizeFlags ONLY_UNIT
      return only unit, without value; this should not be used together with GFORMATSIZELONGFORMAT nor GFORMATSIZEONLYVALUE. Since: 2.74
  • Method Details

    • values

      public static FormatSizeFlags[] 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

      public static FormatSizeFlags valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<FormatSizeFlags> of(int flags)
      Create a new EnumSet<FormatSizeFlags> for the provided bitfield
      Parameters:
      flags - the FormatSizeFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<FormatSizeFlags> of(MemorySegment address)
      Create a new EnumSet<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