コード例 #1
0
    /**
     * @param flags Flags.
     * @return String builder containing all flags.
     */
    static String toString(short flags) {
      SB sb = new SB();

      for (Mask m : MASKS) {
        if (m.ordinal() != 0) sb.a('|');

        sb.a(m.name().toLowerCase()).a('=').a(m.bit(flags));
      }

      return sb.toString();
    }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public String toString() {
    GridCacheMvccCandidate<?> prev = previous();
    GridCacheMvccCandidate<?> next = next();

    return S.toString(
        GridCacheMvccCandidate.class,
        this,
        "key",
        parent == null ? null : parent.key(),
        "masks",
        Mask.toString(flags()),
        "prevVer",
        (prev == null ? null : prev.version()),
        "nextVer",
        (next == null ? null : next.version()));
  }
コード例 #3
0
 /**
  * Sets mask value.
  *
  * @param mask Mask.
  * @param on Flag.
  */
 private void mask(Mask mask, boolean on) {
   flags = mask.set(flags, on);
 }