@Test public void write() { ShortOption option = new ShortOption(); option.modify((short) 100); ShortOption restored = restore(option); assertThat(restored.get(), is(option.get())); }
@Override public void write(DataOutput out) throws IOException { if (isNull()) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeShort(value); } }
ShortOption extends ValueOption<ShortOption> { @Override public void write(DataOutput out) throws IOException { if (isNull()) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeShort(value); } } }
ShortOption extends ValueOption<ShortOption> { @Override public void write(DataOutput out) throws IOException { if (isNull()) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeShort(value); } } ShortOption();  ShortOption(short value); }
ShortOption extends ValueOption<ShortOption> { @Override public void write(DataOutput out) throws IOException { if (isNull()) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeShort(value); } } ShortOption();  ShortOption(short value); short get(); short or(short alternate); @Deprecated ShortOption modify(short newValue); @Override @Deprecated void copyFrom(ShortOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(int other); @Override int compareTo(WritableRawComparable o); @Override String toString(); @Override void write(DataOutput out); @SuppressWarnings("deprecation") @Override void readFields(DataInput in); @SuppressWarnings("deprecation") @Override int restore(byte[] bytes, int offset, int limit); @Override int getSizeInBytes(byte[] buf, int offset); @Override int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); static int getBytesLength(byte[] bytes, int offset, int length); static int compareBytes(
            byte[] b1, int s1, int l1,
            byte[] b2, int s2, int l2); }
ShortOption extends ValueOption<ShortOption> { @Override public void write(DataOutput out) throws IOException { if (isNull()) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeShort(value); } } ShortOption();  ShortOption(short value); short get(); short or(short alternate); @Deprecated ShortOption modify(short newValue); @Override @Deprecated void copyFrom(ShortOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(int other); @Override int compareTo(WritableRawComparable o); @Override String toString(); @Override void write(DataOutput out); @SuppressWarnings("deprecation") @Override void readFields(DataInput in); @SuppressWarnings("deprecation") @Override int restore(byte[] bytes, int offset, int limit); @Override int getSizeInBytes(byte[] buf, int offset); @Override int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); static int getBytesLength(byte[] bytes, int offset, int length); static int compareBytes(
            byte[] b1, int s1, int l1,
            byte[] b2, int s2, int l2);  }