Пример #1
0
 /**
  * Sets the value of an identified short field.
  *
  * @param id field identifier
  * @param value value to set for the field identified by {@code id}.
  * @return this object.
  */
 @SuppressWarnings("unchecked") // safe by specification
 public SUB set(ShortFieldId<? extends SUB> id, short value) {
   buffer.putShort(id.address(), value);
   return (SUB) this;
 }
Пример #2
0
 /**
  * Gets the value of an identified short field.
  *
  * @param id field identifier
  * @return the value of the field identified by {@code id}.
  */
 public short get(ShortFieldId<? extends SUB> id) {
   return buffer.getShort(id.address());
 }