Example usage for java.lang Byte valueOf

List of usage examples for java.lang Byte valueOf

Introduction

In this page you can find the example usage for java.lang Byte valueOf.

Prototype

public static Byte valueOf(String s) throws NumberFormatException 

Source Link

Document

Returns a Byte object holding the value given by the specified String .

Usage

From source file:org.op4j.functions.FnBigDecimal.java

/**
 * <p>/*from  w  w  w  . ja v  a 2  s .c o m*/
 * It divides the target element by the given divisor and returns the
 * remainder (target % divisor). The remainder precision and {@link RoundingMode}
 * is specified by the given {@link MathContext}
 * </p>
 * 
 * @param divisor the divisor
 * @param mathContext the {@link MathContext} to define {@link RoundingMode} and precision
 * @return the remainder of target/divisor
 */
public final static Function<BigDecimal, BigDecimal> remainder(byte divisor, MathContext mathContext) {
    return remainder(Byte.valueOf(divisor), mathContext);
}

From source file:org.op4j.functions.FnObject.java

/**
 * <p>//from   w  w w.  ja v a 2s  .co  m
 * Determines whether the target object is between min and max
 * in value, this is, whether 
 * <tt>target.compareTo(min) &gt;= 0 &amp;&amp; target.compareTo(max) &lt;= 0</tt>. 
 * The target and the specified min and max have to implement {@link Comparable}.
 * </p>
 * 
 * @param min the minimum value of the target
 * @param max the maximum value of the target
 * @return true if the target is between min and max (or it's equal to any of them)
 */
public static final Function<Object, Boolean> between(final byte min, final byte max) {
    return new Between(Byte.valueOf(min), Byte.valueOf(max));
}

From source file:org.op4j.functions.FnDouble.java

/**
 * <p>/*from  w w w .  j  a va  2  s.  c  o m*/
 * It divides the target element by the given divisor and returns the
 * remainder (target % divisor). The remainder precision and {@link RoundingMode}
 * is specified by the given {@link MathContext}
 * </p>
 * 
 * @param divisor the divisor
 * @param mathContext the {@link MathContext} to define {@link RoundingMode} and precision
 * @return the remainder of target/divisor
 */
public final static Function<Double, Double> remainder(byte divisor, MathContext mathContext) {
    return remainder(Byte.valueOf(divisor), mathContext);
}

From source file:org.op4j.functions.FnBigDecimal.java

/**
 * <p>/*w  w w .  j  a  va  2  s. c om*/
 * It multiplies target by multiplicand and returns its value
 * </p>
 * 
 * @param multiplicand the multiplicand
 * @return the result of target * multiplicand
 */
public final static Function<BigDecimal, BigDecimal> multiplyBy(byte multiplicand) {
    return multiplyBy(Byte.valueOf(multiplicand));
}

From source file:org.op4j.functions.FnDouble.java

/**
* <p>/*from w w w  . ja  va 2s.c om*/
* It multiplies target by multiplicand and returns its value
* </p>
* 
* @param multiplicand the multiplicand
* @return the result of target * multiplicand
*/
public final static Function<Double, Double> multiplyBy(byte multiplicand) {
    return multiplyBy(Byte.valueOf(multiplicand));
}

From source file:org.op4j.functions.FnBigDecimal.java

/**
 * <p>/*from  w  ww. j  av  a  2s.  com*/
 * It multiplies target by multiplicand and returns its value. The result precision
 * and {@link RoundingMode} is specified by the given {@link MathContext}
 * </p>
 * 
 * @param multiplicand the multiplicand
 * @param mathContext the {@link MathContext} to define {@link RoundingMode} and precision
 * @return the result of target * multiplicand
 */
public final static Function<BigDecimal, BigDecimal> multiplyBy(byte multiplicand, MathContext mathContext) {
    return multiplyBy(Byte.valueOf(multiplicand), mathContext);
}

From source file:org.op4j.functions.FnDouble.java

/**
* <p>//w  ww . j a  v a2s. co m
* It multiplies target by multiplicand and returns its value. The result precision
* and {@link RoundingMode} is specified by the given {@link MathContext}
* </p>
* 
* @param multiplicand the multiplicand
* @param mathContext the {@link MathContext} to define {@link RoundingMode} and precision
* @return the result of target * multiplicand
*/
public final static Function<Double, Double> multiplyBy(byte multiplicand, MathContext mathContext) {
    return multiplyBy(Byte.valueOf(multiplicand), mathContext);
}

From source file:org.apache.openjpa.kernel.StateManagerImpl.java

public void storeByte(int field, byte externalVal) {
    FieldMetaData fmd = _meta.getField(field);
    if (!fmd.isExternalized())
        storeByteField(field, externalVal);
    else/*from   w ww .  ja v  a2 s .  co m*/
        storeField(field, fmd.getFieldValue(Byte.valueOf(externalVal), _broker));
}

From source file:org.op4j.functions.FnBigDecimal.java

/**
 * <p>/*w  ww . j a  va  2 s  . c om*/
 * It multiplies target by multiplicand and returns its value. The result is 
 * rounded based on the given {@link RoundingMode} 
 * </p>
 * 
 * @param multiplicand the multiplicand
 * @param roundingMode the {@link RoundingMode} 
 * @return the result of target * multiplicand
 */
public final static Function<BigDecimal, BigDecimal> multiplyBy(byte multiplicand, RoundingMode roundingMode) {
    return multiplyBy(Byte.valueOf(multiplicand), roundingMode);
}

From source file:org.op4j.functions.FnDouble.java

/**
* <p>//ww w.  j a va 2s  .  c  o  m
* It multiplies target by multiplicand and returns its value. The result is 
* rounded based on the given {@link RoundingMode} 
* </p>
* 
* @param multiplicand the multiplicand
* @param roundingMode the {@link RoundingMode} 
* @return the result of target * multiplicand
*/
public final static Function<Double, Double> multiplyBy(byte multiplicand, RoundingMode roundingMode) {
    return multiplyBy(Byte.valueOf(multiplicand), roundingMode);
}