/** * Create an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> * @see UByte#valueOf(short) */ public static UByte ubyte(long value) throws NumberFormatException { return UByte.valueOf(value); }
@Override public UByte convert(Integer in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
/** * Create an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> * @see UByte#valueOf(short) */ public static UByte ubyte(short value) throws NumberFormatException { return UByte.valueOf(value); }
public UByte subtract(final int val) { return valueOf(value - val); } }
@Override public UByte convert(Long in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
/** * Replace version read through deserialization with cached version. Note * that this does not use the {@link #valueOfUnchecked(short)} as we have no * guarantee that the value from the stream is valid. * * @return cached instance of this object's value * @throws ObjectStreamException */ private Object readResolve() throws ObjectStreamException { return valueOf(value); }
@Override public UByte convert(Byte in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
@Override public UByte convert(Integer in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
/** * Create an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> * @see UByte#valueOf(short) */ public static UByte ubyte(int value) throws NumberFormatException { return UByte.valueOf(value); }
/** * Replace version read through deserialization with cached version. Note * that this does not use the {@link #valueOfUnchecked(short)} as we have no * guarantee that the value from the stream is valid. * * @return cached instance of this object's value * @throws ObjectStreamException */ private Object readResolve() throws ObjectStreamException { return valueOf(value); }
/** * Create an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned byte</code>. * @see UByte#valueOf(String) */ public static UByte ubyte(String value) throws NumberFormatException { return value == null ? null : UByte.valueOf(value); }
/** * Create an <code>unsigned byte</code> by masking it with <code>0xFF</code> * i.e. <code>(byte) -1</code> becomes <code>(ubyte) 255</code> * * @see UByte#valueOf(byte) */ public static UByte ubyte(byte value) { return UByte.valueOf(value); }
@Override public UByte convert(Byte in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
/** * Create an <code>unsigned byte</code> by masking it with <code>0xFF</code> * i.e. <code>(byte) -1</code> becomes <code>(ubyte) 255</code> * * @see UByte#valueOf(byte) */ public static UByte ubyte(byte value) { return UByte.valueOf(value); }
/** * Create an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> * @see UByte#valueOf(short) */ public static UByte ubyte(int value) throws NumberFormatException { return UByte.valueOf(value); }
public UByte add(UByte val) throws NumberFormatException { return valueOf(value + val.value); }
public UByte add(int val) throws NumberFormatException { return valueOf(value + val); }
@Override public UByte convert(Short in, Context context) throws Exception { if (in == null) { return null; } return UByte.valueOf(in); } });
@Override final UByte get0(BindingGetStatementContext<U> ctx) throws SQLException { String string = ctx.statement().getString(ctx.index()); return string == null ? null : UByte.valueOf(string); }
@Override final UByte get0(BindingGetSQLInputContext<U> ctx) throws SQLException { String string = ctx.input().readString(); return string == null ? null : UByte.valueOf(string); }