Пример #1
0
 /**
  * Clears a number of flags in a message
  *
  * @param flags The flags
  * @return A reference to the message
  */
 public Message clearFlag(Flag... flags) {
   if (flags != null) for (Flag flag : flags) if (flag != null) this.flags &= ~flag.value();
   return this;
 }
Пример #2
0
 public static boolean isFlagSet(short flags, Flag flag) {
   return flag != null && ((flags & flag.value()) == flag.value());
 }
Пример #3
0
 /**
  * Sets a number of flags in a message
  *
  * @param flags The flag or flags
  * @return A reference to the message
  */
 public Message setFlag(Flag... flags) {
   if (flags != null) for (Flag flag : flags) if (flag != null) this.flags |= flag.value();
   return this;
 }