Ejemplo n.º 1
0
 /**
  * Intersects this mask with the given reasons mask.
  *
  * @param mask The mask to intersect with.
  * @return The intersection of this and teh given mask.
  */
 ReasonsMask intersect(ReasonsMask mask) {
   ReasonsMask _mask = new ReasonsMask();
   _mask.addReasons(new ReasonsMask(_reasons & mask.getReasons()));
   return _mask;
 }
Ejemplo n.º 2
0
 /**
  * Returns <code>true</code> if the passed reasons mask has new reasons.
  *
  * @param mask The reasons mask which should be tested for new reasons.
  * @return <code>true</code> if the passed reasons mask has new reasons.
  */
 boolean hasNewReasons(ReasonsMask mask) {
   return ((_reasons | mask.getReasons() ^ _reasons) != 0);
 }
Ejemplo n.º 3
0
 /**
  * Adds all reasons from the reasons mask to this mask.
  *
  * @param mask The reasons mask to add.
  */
 void addReasons(ReasonsMask mask) {
   _reasons = _reasons | mask.getReasons();
 }