code: public void updateByModeBits(Mode.Bits bits) {
      // Each index equals to corresponding AclAction's ordinal.
      // E.g. Mode.Bits.READ corresponds to AclAction.READ, the former has index 0 in indexedBits,
      // the later has ordinal 0 in AclAction.
      Mode.Bits[] indexedBits = new Mode.Bits[]{
          Mode.Bits.READ, Mode.Bits.WRITE, Mode.Bits.EXECUTE
      };
      for (int i = 0; i < 3; i++) {
        if (bits.imply(indexedBits[i])) {
          mActions.set(i);
        } else {
          mActions.clear(i);
        }
      }
    }
docs: Updates permitted actions based on the mode bits.
  
  For example, if bits imply READ, then READ is added to permitted actions, otherwise,
  READ is removed from permitted actions.
  Same logic applies to WRITE and EXECUTE.
  
  @param bits the mode bits