DynamicBuilders.DynamicFloat


@RequiresSchemaVersion(major = 1, minor = 200)
interface DynamicBuilders.DynamicFloat : DynamicBuilders.DynamicType


Interface defining a dynamic float type.

It offers a set of helper methods for creating arithmetic and logical expressions, e.g. plus, times, eq, etc. These helper methods produce expression trees based on the order in which they were called in an expression. Thus, no operator precedence rules are applied.

For example the following expression is equivalent to result = ((a + b)*c)/d :

a.plus(b).times(c).div(d);
More complex expressions can be created by nesting expressions. For example the following expression is equivalent to result = (a + b)*(c - d) :
(a.plus(b)).times(c.minus(d));

Summary

Public functions

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate()

Returns a DynamicFloat that is bound to the value of this DynamicFloat and every time its value is changing, it animates from its current value to the new value.

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(animationSpec: AnimationParameterBuilders.AnimationSpec)

Returns a DynamicFloat that is bound to the value of this DynamicFloat and every time its value is changing, it animates from its current value to the new value.

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>)

Creates a DynamicFloat that is bound to the value of an item of the State.

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(
    dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>,
    animationSpec: AnimationParameterBuilders.AnimationSpec
)

Creates a DynamicFloat that is bound to the value of an item of the State.

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(start: Float, end: Float)

Creates a DynamicFloat which will animate over the range of floats from start to end.

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(
    start: Float,
    end: Float,
    animationSpec: AnimationParameterBuilders.AnimationSpec
)

Creates a DynamicFloat which will animate over the range of floats from start to end with the given animation parameters.

DynamicBuilders.DynamicInt32
@RequiresSchemaVersion(major = 1, minor = 200)
asInt()

Returns a DynamicInt32 which holds the largest integer value that is smaller than or equal to this DynamicFloat, i.e. int result = (int) Math.floor(this)

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
constant(constant: Float)

Creates a constant-valued DynamicFloat.

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
div(other: DynamicBuilders.DynamicFloat)

Creates a DynamicFloat containing the result of dividing this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(1.4f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
div(other: DynamicBuilders.DynamicInt32)

Creates a DynamicFloat containing the result of dividing this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(1.4f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
div(other: Float)

Creates a DynamicFloat containing the result of dividing this by a float; As an example, the following is equal to DynamicFloat.constant(1.4f)

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
eq(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat and other are equal, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
eq(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat and other are equal, otherwise it's false.

DynamicBuilders.DynamicString
@RequiresSchemaVersion(major = 1, minor = 200)
format()

Returns a DynamicString that contains the formatted value of this (with default formatting parameters).

DynamicBuilders.DynamicString

Returns a DynamicString that contains the formatted value of this .

java-static DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
from(dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>)

Creates a DynamicFloat that is bound to the value of an item of the State.

java-static DynamicBuilders.DynamicFloat

Creates a DynamicFloat from a byte array generated by toDynamicFloatByteArray.

java-static DynamicBuilders.DynamicFloat
fromByteArray(byteArray: ByteArray, offset: Int, length: Int)

Creates a DynamicFloat from the provided byte array at the provided offset and length, that was generated by one of the toDynamicFloatByteArray overloads.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gt(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gt(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gte(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than or equal to other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gte(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than or equal to other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lt(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat is less than other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lt(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat is less than other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lte(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat is less than or equal to other, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lte(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat is less than or equal to other, otherwise it's false.

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
minus(other: DynamicBuilders.DynamicFloat)

Creates a DynamicFloat containing the result of subtracting another from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
minus(other: DynamicBuilders.DynamicInt32)

Creates a DynamicFloat containing the result of subtracting a from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
minus(other: Float)

Creates a DynamicFloat containing the result of subtracting a float from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
ne(other: DynamicBuilders.DynamicFloat)

Returns a DynamicBool that is true if the value of this DynamicFloat and other are not equal, otherwise it's false.

DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
ne(other: Float)

Returns a DynamicBool that is true if the value of this DynamicFloat and other are not equal, otherwise it's false.

java-static ConditionScopes.ConditionScope<DynamicBuilders.DynamicFloat!, Float!>
@RequiresSchemaVersion(major = 1, minor = 200)
onCondition(condition: DynamicBuilders.DynamicBool)

Bind the value of this DynamicFloat to the result of a conditional expression.

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
plus(other: DynamicBuilders.DynamicFloat)

Creates a DynamicFloat containing the result of adding another to this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(12f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
plus(other: DynamicBuilders.DynamicInt32)

Creates a DynamicFloat containing the result of adding a DynamicInt32 to this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(12f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
plus(other: Float)

Creates a DynamicFloat containing the result of adding a float to this ; As an example, the following is equal to DynamicFloat.constant(12f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
rem(other: DynamicBuilders.DynamicFloat)

Creates a DynamicFloat containing the reminder of dividing this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(1.5f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
rem(other: DynamicBuilders.DynamicInt32)

Creates a DynamicFloat containing the reminder of dividing this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(2f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
rem(other: Float)

Creates a DynamicFloat containing the reminder of dividing this by a float; As an example, the following is equal to DynamicFloat.constant(1.5f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
times(other: DynamicBuilders.DynamicFloat)

Creates a DynamicFloat containing the result of multiplying this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(35f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
times(other: DynamicBuilders.DynamicInt32)

Creates a DynamicFloat containing the result of multiplying this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(35f)

DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
times(other: Float)

Creates a DynamicFloat containing the result of multiplying this by a float; As an example, the following is equal to DynamicFloat.constant(35f)

ByteArray<Byte>

Serializes the DynamicFloat into a new byte array that can later be used with fromByteArray.

Int

Serializes the DynamicFloat into the provided byte array, returning the amount of bytes written, that can later be used with DynamicFloat.fromByteArray(byteArray, 0, bytesWritten).

Int
toDynamicFloatByteArray(byteArray: ByteArray, offset: Int, length: Int)

Serializes the DynamicFloat into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with DynamicFloat.fromByteArray(byteArray, offset, bytesWritten).

Public functions

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun animate(): DynamicBuilders.DynamicFloat

Returns a DynamicFloat that is bound to the value of this DynamicFloat and every time its value is changing, it animates from its current value to the new value.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun animate(animationSpec: AnimationParameterBuilders.AnimationSpec): DynamicBuilders.DynamicFloat

Returns a DynamicFloat that is bound to the value of this DynamicFloat and every time its value is changing, it animates from its current value to the new value.

Parameters
animationSpec: AnimationParameterBuilders.AnimationSpec

The animation parameters.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun animate(dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>): DynamicBuilders.DynamicFloat

Creates a DynamicFloat that is bound to the value of an item of the State. Every time the state value changes, this DynamicFloat will animate from its current value to the new value (from the state).

Parameters
dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>

The data source to a DynamicDataValue with a float value.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun animate(
    dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>,
    animationSpec: AnimationParameterBuilders.AnimationSpec
): DynamicBuilders.DynamicFloat

Creates a DynamicFloat that is bound to the value of an item of the State. Every time the state value changes, this DynamicFloat will animate from its current value to the new value (from the state).

Parameters
dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>

The source key to a DynamicDataValue with a float value.

animationSpec: AnimationParameterBuilders.AnimationSpec

The animation parameters.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun animate(start: Float, end: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat which will animate over the range of floats from start to end.

Parameters
start: Float

The start value of the range.

end: Float

The end value of the range.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun animate(
    start: Float,
    end: Float,
    animationSpec: AnimationParameterBuilders.AnimationSpec
): DynamicBuilders.DynamicFloat

Creates a DynamicFloat which will animate over the range of floats from start to end with the given animation parameters.

Parameters
start: Float

The start value of the range.

end: Float

The end value of the range.

animationSpec: AnimationParameterBuilders.AnimationSpec

The animation parameters.

asInt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun asInt(): DynamicBuilders.DynamicInt32

Returns a DynamicInt32 which holds the largest integer value that is smaller than or equal to this DynamicFloat, i.e. int result = (int) Math.floor(this)

If the float value is larger than MAX_VALUE or smaller than MIN_VALUE, the result of this operation will be invalid and any expression that uses the DynamicInt32 will have an invalid result (which will be delivered through #onInvalidate().

constant

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun constant(constant: Float): DynamicBuilders.DynamicFloat

Creates a constant-valued DynamicFloat.

If Float.isNan(constant) is true, the value will be invalid. And any expression that uses this DynamicFloat will have an invalid result (which will be delivered through #onInvalidate().

div

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun div(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of dividing this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(1.4f)

  DynamicFloat.constant(7f).div(DynamicFloat.constant(5f));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

div

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun div(other: DynamicBuilders.DynamicInt32): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of dividing this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(1.4f)

  DynamicFloat.constant(7f).div(DynamicInt32.constant(5));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

div

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun div(other: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of dividing this by a float; As an example, the following is equal to DynamicFloat.constant(1.4f)

  DynamicFloat.constant(7f).div(5f);
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

eq

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun eq(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat and other are equal, otherwise it's false.

eq

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun eq(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat and other are equal, otherwise it's false.

format

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun format(): DynamicBuilders.DynamicString

Returns a DynamicString that contains the formatted value of this (with default formatting parameters). As an example, for locale en_US, the following is equal to DynamicString.constant("12.346")

  DynamicFloat.constant(12.34567f).format();
The resulted DynamicString is subject to being truncated if it's too long.

format

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun format(formatter: DynamicBuilders.DynamicFloat.FloatFormatter): DynamicBuilders.DynamicString

Returns a DynamicString that contains the formatted value of this . As an example, for locale en_US, the following is equal to DynamicString.constant("0,012.34")

  DynamicFloat.constant(12.345f)
      .format(
          new FloatFormatter.Builder().setMaxFractionDigits(2).setMinIntegerDigits(4)
                            .setGroupingUsed(true).build());
The resulted DynamicString is subject to being truncated if it's too long.
Parameters
formatter: DynamicBuilders.DynamicFloat.FloatFormatter

The formatting parameter.

from

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun from(dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>): DynamicBuilders.DynamicFloat

Creates a DynamicFloat that is bound to the value of an item of the State.

Parameters
dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicFloat!>

The data source to a DynamicDataValue with a float value.

fromByteArray

Added in 1.0.0
java-static fun fromByteArray(byteArray: ByteArray): DynamicBuilders.DynamicFloat

Creates a DynamicFloat from a byte array generated by toDynamicFloatByteArray.

Throws
java.lang.IllegalArgumentException

if the byte array does not contain a valid serialization

fromByteArray

Added in 1.0.0
java-static fun fromByteArray(byteArray: ByteArray, offset: Int, length: Int): DynamicBuilders.DynamicFloat

Creates a DynamicFloat from the provided byte array at the provided offset and length, that was generated by one of the toDynamicFloatByteArray overloads.

Throws
java.lang.IllegalArgumentException

if the byte array does not contain a valid serialization in the provided offset and length

gt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun gt(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than other, otherwise it's false.

gt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun gt(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than other, otherwise it's false.

gte

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun gte(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than or equal to other, otherwise it's false.

gte

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun gte(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is greater than or equal to other, otherwise it's false.

lt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun lt(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is less than other, otherwise it's false.

lt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun lt(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is less than other, otherwise it's false.

lte

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun lte(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is less than or equal to other, otherwise it's false.

lte

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun lte(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat is less than or equal to other, otherwise it's false.

minus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun minus(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of subtracting another from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

  DynamicFloat.constant(7f).minus(DynamicFloat.constant(5f));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

minus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun minus(other: DynamicBuilders.DynamicInt32): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of subtracting a from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

  DynamicFloat.constant(7f).minus(DynamicInt32.constant(5));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

minus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun minus(other: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of subtracting a float from this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(2f)

  DynamicFloat.constant(7f).minus(5f);
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

ne

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun ne(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat and other are not equal, otherwise it's false.

ne

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun ne(other: Float): DynamicBuilders.DynamicBool

Returns a DynamicBool that is true if the value of this DynamicFloat and other are not equal, otherwise it's false.

onCondition

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun onCondition(condition: DynamicBuilders.DynamicBool): ConditionScopes.ConditionScope<DynamicBuilders.DynamicFloat!, Float!>

Bind the value of this DynamicFloat to the result of a conditional expression. This will use the value given in either use or elseUse depending on the value yielded from condition.

plus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun plus(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of adding another to this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(12f)

  DynamicFloat.constant(7f).plus(DynamicFloat.constant(5f));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

plus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun plus(other: DynamicBuilders.DynamicInt32): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of adding a DynamicInt32 to this DynamicFloat; As an example, the following is equal to DynamicFloat.constant(12f)

  DynamicFloat.constant(7f).plus(DynamicInt32.constant(5));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

plus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun plus(other: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of adding a float to this ; As an example, the following is equal to DynamicFloat.constant(12f)

  DynamicFloat.constant(7f).plus(5f);
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

rem

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun rem(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the reminder of dividing this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(1.5f)

  DynamicFloat.constant(7f).rem(DynamicFloat.constant(5.5f));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

rem

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun rem(other: DynamicBuilders.DynamicInt32): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the reminder of dividing this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(2f)

  DynamicFloat.constant(7f).rem(DynamicInt32.constant(5));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

rem

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun rem(other: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the reminder of dividing this by a float; As an example, the following is equal to DynamicFloat.constant(1.5f)

  DynamicFloat.constant(7f).rem(5.5f);
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

times

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun times(other: DynamicBuilders.DynamicFloat): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of multiplying this by another DynamicFloat; As an example, the following is equal to DynamicFloat.constant(35f)

  DynamicFloat.constant(7f).times(DynamicFloat.constant(5f));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

times

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun times(other: DynamicBuilders.DynamicInt32): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of multiplying this by a DynamicInt32; As an example, the following is equal to DynamicFloat.constant(35f)

  DynamicFloat.constant(7f).times(DynamicInt32.constant(5));
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

times

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun times(other: Float): DynamicBuilders.DynamicFloat

Creates a DynamicFloat containing the result of multiplying this by a float; As an example, the following is equal to DynamicFloat.constant(35f)

  DynamicFloat.constant(7f).times(5f);
The operation's evaluation order depends only on its position in the expression; no operator precedence rules are applied. See DynamicFloat for more information on operation evaluation order.
Returns
DynamicBuilders.DynamicFloat

a new instance of DynamicFloat containing the result of the operation.

toDynamicFloatByteArray

Added in 1.0.0
fun toDynamicFloatByteArray(): ByteArray<Byte>

Serializes the DynamicFloat into a new byte array that can later be used with fromByteArray.

toDynamicFloatByteArray

Added in 1.0.0
fun toDynamicFloatByteArray(byteArray: ByteArray): Int

Serializes the DynamicFloat into the provided byte array, returning the amount of bytes written, that can later be used with DynamicFloat.fromByteArray(byteArray, 0, bytesWritten).

Throws
java.lang.IllegalArgumentException

if the byte array is too small

toDynamicFloatByteArray

Added in 1.0.0
fun toDynamicFloatByteArray(byteArray: ByteArray, offset: Int, length: Int): Int

Serializes the DynamicFloat into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with DynamicFloat.fromByteArray(byteArray, offset, bytesWritten).

Throws
java.lang.IllegalArgumentException

if the byte array is too small