@Override public float floatValue() { return _value.floatValue(); }
@Override public float floatValue() { return _value.floatValue(); }
@Override public float floatValue() { return _value.floatValue(); }
/** * Return percentage of cpu time spent over the time since last update. * CPU time spent is based on elapsed jiffies multiplied by amount of * time for 1 core. Thus, if you use 2 cores completely you would have spent * twice the actual time between updates and this will return 200%. * * @return Return percentage of cpu usage since last update, {@link * CpuTimeTracker#UNAVAILABLE} if there haven't been 2 updates more than * {@link CpuTimeTracker#minimumTimeInterval} apart */ public float getCpuTrackerUsagePercent() { if (lastSampleTime == UNAVAILABLE || lastSampleTime > sampleTime) { // lastSampleTime > sampleTime may happen when the system time is changed lastSampleTime = sampleTime; lastCumulativeCpuTime = cumulativeCpuTime; return cpuUsage; } // When lastSampleTime is sufficiently old, update cpuUsage. // Also take a sample of the current time and cumulative CPU time for the // use of the next calculation. if (sampleTime > lastSampleTime + minimumTimeInterval) { cpuUsage = ((cumulativeCpuTime.subtract(lastCumulativeCpuTime)).floatValue()) * 100F / ((float) (sampleTime - lastSampleTime)); lastSampleTime = sampleTime; lastCumulativeCpuTime = cumulativeCpuTime; } return cpuUsage; }
/** * <p> * Gets the fraction as a {@code float}. This calculates the fraction as * the numerator divided by denominator. * </p> * * @return the fraction as a {@code float}. * @see java.lang.Number#floatValue() */ @Override public float floatValue() { float result = numerator.floatValue() / denominator.floatValue(); if (Double.isNaN(result)) { // Numerator and/or denominator must be out of range: // Calculate how far to shift them to put them in range. int shift = FastMath.max(numerator.bitLength(), denominator.bitLength()) - FastMath.getExponent(Float.MAX_VALUE); result = numerator.shiftRight(shift).floatValue() / denominator.shiftRight(shift).floatValue(); } return result; }
public static String toFriendlyString(BigInteger value) { if (value.compareTo(ETHER.value()) == 1 || value.compareTo(ETHER.value()) == 0) { return Float.toString(value.divide(ETHER.value()).floatValue()) + " ETHER"; } else if(value.compareTo(FINNEY.value()) == 1 || value.compareTo(FINNEY.value()) == 0) { return Float.toString(value.divide(FINNEY.value()).floatValue()) + " FINNEY"; } else if(value.compareTo(SZABO.value()) == 1 || value.compareTo(SZABO.value()) == 0) { return Float.toString(value.divide(SZABO.value()).floatValue()) + " SZABO"; } else return Float.toString(value.divide(WEI.value()).floatValue()) + " WEI"; } }
return (X) Float.valueOf( value.floatValue() );
@Override public void setXslFO(Element foElement) { if (((HpsMeasure)this.getObject())!=null ) { float pts = ((HpsMeasure)this.getObject()).getVal().floatValue()/2 ; foElement.setAttribute(FO_NAME, pts + "pt" ); } else { // } }
@Override public String getCssProperty() { if (((HpsMeasure)this.getObject())!=null ) { float pts = ((HpsMeasure)this.getObject()).getVal().floatValue()/2 ; return composeCss(CSS_NAME, pts + "pt" ); } else { return CSS_NULL; } }
public void testFloatValue() { for (int value : TEST_INTS) { UnsignedInteger unsignedValue = UnsignedInteger.fromIntBits(value); assertEquals(unsignedValue.bigIntegerValue().floatValue(), unsignedValue.floatValue()); } }
public void testFloatValue() { for (long value : TEST_LONGS) { UnsignedLong unsignedValue = UnsignedLong.fromLongBits(value); assertEquals(unsignedValue.bigIntegerValue().floatValue(), unsignedValue.floatValue()); } }
protected void set_BigInteger(BigInteger v) { set_float(v.floatValue()); }
return ((BigInteger) o).doubleValue(); } else if (o instanceof BigInteger && cls.isAssignableFrom(Float.class)) { return ((BigInteger) o).floatValue(); } else if (o instanceof BigInteger && cls.isAssignableFrom(Short.class)) { return ((BigInteger) o).shortValue();
@Override public float floatValue () { return m_aValue.floatValue (); }
@Override public float floatValue() { return value.floatValue(); }
@Override public float floatValue() { return m_numerator.divide(m_denominator).floatValue(); } @Override
@Override public Float getValue( CTRPr pr, XWPFStylesDocument document ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; }
@Override public Float getValue( CTParaRPr pr, XWPFStylesDocument document ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; } }
@Override public float floatValue() { float f = value.floatValue(); if (Float.isInfinite(f)) error(new TypeError("The value " + princToString() + " is too large to be converted to a single float.")); return f; }
@Override public Object parseLiteral(Object input) { if (input instanceof IntValue) { return new FloatNode(((IntValue) input).getValue().floatValue()); } if (input instanceof FloatValue) { return new FloatNode(((FloatValue) input).getValue().floatValue()); } else { throw new CoercingParseLiteralException(errorMessage(input, IntValue.class, FloatValue.class)); } } });