Class ToFloat

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.conversions.from_long.ToFloat
All Implemented Interfaces:
LongFunction<Float>

public class ToFloat extends Object implements LongFunction<Float>
Create a float by converting values. This function works in the following modes:
  • If a float is provided, then the long input is scaled to be between 0.0f and the value provided, as a fraction of the highest possible long.
  • If any other type of number is provided, then this function returns the equivalent float value.
  • Otherwise, the input is assumed to be a function which takes a long input, and, if necessary, adapts to return a float with an appropriate type conversion.