static short toShort(O o) { if (o == null) ret (short) 0; if (o instanceof Number) ret ((Number) o).shortValue(); if (o instanceof S) ret toShort(parseLong((S) o)); throw fail("not convertible to short: " + getClassName(o)); } static short toShort(long l) { if (l != (short) l) fail("Too large for short: " + l); ret (short) l; }