Enum Class SessionOrdering

java.lang.Object
java.lang.Enum<SessionOrdering>
io.github.fherbreteau.vodozemac.megolm.SessionOrdering
All Implemented Interfaces:
Serializable, Comparable<SessionOrdering>, Constable

public enum SessionOrdering extends Enum<SessionOrdering>
The result of a comparison between two InboundGroupSession types.

Tells us if one session can be considered to be better than another one. This is used when multiple sessions with the same session ID are received with varying degrees of trust and first known message indices.

Author:
François HERBRETEAU
See Also:
  • Enum Constant Details

    • EQUAL

      public static final SessionOrdering EQUAL
      The sessions are the same, with identical first known indices.
    • BETTER

      public static final SessionOrdering BETTER
      The first session has a better (lower) initial message index than the second one.
    • WORSE

      public static final SessionOrdering WORSE
      The first session has a worse (higher) initial message index than the second one.
    • UNCONNECTED

      public static final SessionOrdering UNCONNECTED
      The sessions are not connected and cannot be compared.
  • Method Details

    • values

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