java.lang.Object
java.lang.Enum<Flag>
org.telegram.abilitybots.api.objects.Flag
All Implemented Interfaces:
Serializable, Comparable<Flag>, Predicate<org.telegram.telegrambots.meta.api.objects.Update>

public enum Flag extends Enum<Flag> implements Predicate<org.telegram.telegrambots.meta.api.objects.Update>
Flags are an conditions that are applied on an Update.

They can be used on Ability.AbilityBuilder.flag(Predicate[]) and on the post conditions in Ability.AbilityBuilder.reply(BiConsumer, Predicate[]).

Author:
Abbas Abou Daya
  • Enum Constant Details

    • NONE

      public static final Flag NONE
    • MESSAGE

      public static final Flag MESSAGE
    • CALLBACK_QUERY

      public static final Flag CALLBACK_QUERY
    • CHANNEL_POST

      public static final Flag CHANNEL_POST
    • EDITED_CHANNEL_POST

      public static final Flag EDITED_CHANNEL_POST
    • EDITED_MESSAGE

      public static final Flag EDITED_MESSAGE
    • INLINE_QUERY

      public static final Flag INLINE_QUERY
    • CHOSEN_INLINE_QUERY

      public static final Flag CHOSEN_INLINE_QUERY
    • SHIPPING_QUERY

      public static final Flag SHIPPING_QUERY
    • PRECHECKOUT_QUERY

      public static final Flag PRECHECKOUT_QUERY
    • POLL

      public static final Flag POLL
    • POLL_ANSWER

      public static final Flag POLL_ANSWER
    • MY_CHAT_MEMBER

      public static final Flag MY_CHAT_MEMBER
    • CHAT_MEMBER

      public static final Flag CHAT_MEMBER
    • CHAT_JOIN_REQUEST

      public static final Flag CHAT_JOIN_REQUEST
    • REPLY

      public static final Flag REPLY
    • DOCUMENT

      public static final Flag DOCUMENT
    • TEXT

      public static final Flag TEXT
    • PHOTO

      public static final Flag PHOTO
    • LOCATION

      public static final Flag LOCATION
    • CAPTION

      public static final Flag CAPTION
  • Method Details

    • values

      public static Flag[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Flag valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • test

      public boolean test(org.telegram.telegrambots.meta.api.objects.Update update)
      Specified by:
      test in interface Predicate<org.telegram.telegrambots.meta.api.objects.Update>