UInteger m = new UInteger(5); UInteger t = new UInteger(18); UInteger x = new UInteger(42); UInteger y = x.multiplyBy(m); y = y.add(t);
public UInteger subtract(final int val) { return valueOf(value - val); } }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UInteger valueOf(long value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Generate a cached value for initial unsigned integer values. * * @return Array of cached values for UInteger */ private static final UInteger[] mkValues() { int precacheSize = getPrecacheSize(); UInteger[] ret; if (precacheSize <= 0) return null; ret = new UInteger[precacheSize]; for (int i = 0; i < precacheSize; i++) ret[i] = new UInteger(i); return ret; }
/** * Replace version read through deserialization with cached version. * * @return cached instance of this object's value if one exists, otherwise * this object * @throws ObjectStreamException */ private Object readResolve() throws ObjectStreamException { UInteger cached; // the value read could be invalid so check it rangeCheck(value); if ((cached = getCached(value)) != null) return cached; return this; }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned int</code> */ private UInteger(long value) throws NumberFormatException { this.value = rangeCheck(value); }
@Override final void set0(BindingSetStatementContext<U> ctx, UInteger value) throws SQLException { ctx.statement().setLong(ctx.index(), value.longValue()); }
/** * Create an <code>unsigned int</code> by masking it with * <code>0xFFFFFFFF</code> i.e. <code>(int) -1</code> becomes * <code>(uint) 4294967295</code> */ public static UInteger valueOf(int value) { return valueOfUnchecked(value & MAX_VALUE); }
/** * Create an <code>unsigned int</code> by masking it with * <code>0xFFFFFFFF</code> i.e. <code>(int) -1</code> becomes * <code>(uint) 4294967295</code> * * @see UInteger#valueOf(int) */ public static UInteger uint(int value) { return UInteger.valueOf(value); }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UInteger valueOf(long value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Generate a cached value for initial unsigned integer values. * * @return Array of cached values for UInteger */ private static final UInteger[] mkValues() { int precacheSize = getPrecacheSize(); UInteger[] ret; if (precacheSize <= 0) return null; ret = new UInteger[precacheSize]; for (int i = 0; i < precacheSize; i++) ret[i] = new UInteger(i); return ret; }
/** * Replace version read through deserialization with cached version. * * @return cached instance of this object's value if one exists, otherwise * this object * @throws ObjectStreamException */ private Object readResolve() throws ObjectStreamException { UInteger cached; // the value read could be invalid so check it rangeCheck(value); if ((cached = getCached(value)) != null) return cached; return this; }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned int</code> */ private UInteger(long value) throws NumberFormatException { this.value = rangeCheck(value); }
@Override final void set0(BindingSetSQLOutputContext<U> ctx, UInteger value) throws SQLException { ctx.output().writeLong(value.longValue()); }
/** * Create an <code>unsigned int</code> by masking it with * <code>0xFFFFFFFF</code> i.e. <code>(int) -1</code> becomes * <code>(uint) 4294967295</code> */ public static UInteger valueOf(int value) { return valueOfUnchecked(value & MAX_VALUE); }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned int</code>. * @see UInteger#valueOf(String) */ public static UInteger uint(String value) throws NumberFormatException { return value == null ? null : UInteger.valueOf(value); }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned int</code>. */ public static UInteger valueOf(String value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(Long.parseLong(value))); }
/** * Create an <code>unsigned int</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned int</code>. */ private UInteger(String value) throws NumberFormatException { this.value = rangeCheck(Long.parseLong(value)); }