return CstLong.make((Long) value); } else if (value instanceof Short) { return CstShort.make((Short) value); } else if (value instanceof String) { return new CstString((String) value);
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code short} value * @return {@code non-null;} the appropriate instance */ public static CstShort make(short value) { return new CstShort(value); }
/** * Makes an instance for the given {@code int} value. This * may (but does not necessarily) return an already-allocated * instance. * * @param value the value, which must be in range for a {@code short} * @return {@code non-null;} the appropriate instance */ public static CstShort make(int value) { short cast = (short) value; if (cast != value) { throw new IllegalArgumentException("bogus short value: " + value); } return make(cast); }
/** * Gets the {@code short} value. * * @return the value */ public short getValue() { return (short) getIntBits(); } }