예제 #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;
 }