/** * Get an instance of an <code>unsigned byte</code> by masking it with * <code>0xFF</code> i.e. <code>(byte) -1</code> becomes * <code>(ubyte) 255</code> */ public static UByte valueOf(byte value) { return valueOfUnchecked((short) (value & MAX_VALUE)); }
/** * Get an instance of an <code>unsigned byte</code> by masking it with * <code>0xFF</code> i.e. <code>(byte) -1</code> becomes * <code>(ubyte) 255</code> */ public static UByte valueOf(byte value) { return valueOfUnchecked((short) (value & MAX_VALUE)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned byte</code>. */ public static UByte valueOf(String value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(Short.parseShort(value))); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(short value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(long value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(long value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(short value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(int value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> does not contain a * parsable <code>unsigned byte</code>. */ public static UByte valueOf(String value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(Short.parseShort(value))); }
/** * Get an instance of an <code>unsigned byte</code> * * @throws NumberFormatException If <code>value</code> is not in the range * of an <code>unsigned byte</code> */ public static UByte valueOf(int value) throws NumberFormatException { return valueOfUnchecked(rangeCheck(value)); }