return CstByte.make((Byte) value); } else if (value instanceof Character) { return CstChar.make((Character) value); } else if (value instanceof Double) { return CstDouble.make(Double.doubleToLongBits((Double) value));
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(value); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) 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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }
/** * Makes an instance for the given value. This may (but does not * necessarily) return an already-allocated instance. * * @param value the {@code char} value */ public static CstChar make(char value) { return new CstChar(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 char} * @return {@code non-null;} the appropriate instance */ public static CstChar make(int value) { char cast = (char) value; if (cast != value) { throw new IllegalArgumentException("bogus char value: " + value); } return make(cast); }
/** * Gets the {@code char} value. * * @return the value */ public char getValue() { return (char) getIntBits(); } }