code: protected final void _setMetadata(int metadata, int mask, int shift) {
          assert(mask <= ELEMENT_MASK); // don't overwrite the element ID
          _flags &= ~mask;
          _flags |= ((metadata << shift) & mask);
      }
docs: May be used by subclasses to reuse _flag bits for purposes specific
  to that subclass. It is important that only flag bits not currently
  used by that subclass are chosen; otherwise important data may be
  overwritten. NOTE: only the lower 8 bits may be used, because the
  upper 24 are reserved for the element ID.
  @param metadata the metadata to set.
  @param mask the location at which to set the metadata. Must be within
  the lower 8 bits.
  @param shift the number of bits to left-shift the metadata so that
  it starts at the index of the mask's LSB.