Enum Class Ordering

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

@Generated("org.javagi.JavaGI") public enum Ordering extends Enum<Ordering> implements Enumeration

Describes the way two values can be compared.

These values can be used with a GLib.CompareFunc. However, a GCompareFunc is allowed to return any integer values. For converting such a value to a GtkOrdering value, use fromCmpfunc(int).

  • Enum Constant Details

    • SMALLER

      public static final Ordering SMALLER
      the first value is smaller than the second
    • EQUAL

      public static final Ordering EQUAL
      the two values are equal
    • LARGER

      public static final Ordering LARGER
      the first value is larger than the second
  • Method Details

    • values

      public static Ordering[] 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 Ordering 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
    • of

      public static Ordering of(int value)
      Create a new Ordering for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

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

      public static Ordering of(MemorySegment address)
      Create a new Ordering for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the Ordering class.
      Returns:
      the GType
    • fromCmpfunc

      public static Ordering fromCmpfunc(int cmpfuncResult)
      Converts the result of a GCompareFunc like strcmp() to a GtkOrdering value.
      Parameters:
      cmpfuncResult - Result of a comparison function
      Returns:
      the corresponding GtkOrdering
      Since:
      4.2