DynamicBuilders.DynamicFloat


@RequiresSchemaVersion(major = 1, minor = 200)
public interface DynamicBuilders.DynamicFloat extends 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

Nested types

Allows formatting DynamicFloat into a DynamicString.

Builder to create FloatFormatter objects.

Public methods

default @NonNull 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.

default @NonNull 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.

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey
)

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

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey,
    @NonNull AnimationParameterBuilders.AnimationSpec animationSpec
)

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

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(float start, float end)

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

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
animate(
    float start,
    float end,
    @NonNull AnimationParameterBuilders.AnimationSpec animationSpec
)

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

default @NonNull 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)

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
constant(float constant)

Creates a constant-valued DynamicFloat.

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

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

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

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

default @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
div(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
eq(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicString

Returns a DynamicString that contains the formatted value of this .

default static @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
from(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey
)

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

default static @NonNull DynamicBuilders.DynamicFloat
fromByteArray(@NonNull byte[] byteArray)

Creates a DynamicFloat from a byte array generated by toDynamicFloatByteArray.

default static @NonNull DynamicBuilders.DynamicFloat
fromByteArray(@NonNull byte[] byteArray, int offset, int length)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gt(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
gte(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lt(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
lte(float other)

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

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

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

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

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

default @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
minus(float other)

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

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

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

default @NonNull DynamicBuilders.DynamicBool
@RequiresSchemaVersion(major = 1, minor = 200)
ne(float other)

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

default static @NonNull ConditionScopes.ConditionScope<DynamicBuilders.DynamicFloatFloat>
@RequiresSchemaVersion(major = 1, minor = 200)
onCondition(@NonNull DynamicBuilders.DynamicBool condition)

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

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

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

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

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

default @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
plus(float other)

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

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

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

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

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

default @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
rem(float other)

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

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

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

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

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

default @NonNull DynamicBuilders.DynamicFloat
@RequiresSchemaVersion(major = 1, minor = 200)
times(float other)

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

default @NonNull byte[]

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

default int
toDynamicFloatByteArray(@NonNull byte[] byteArray)

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).

default int
toDynamicFloatByteArray(@NonNull byte[] byteArray, int offset, int length)

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 methods

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat 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.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat animate(@NonNull AnimationParameterBuilders.AnimationSpec 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.

Parameters
@NonNull AnimationParameterBuilders.AnimationSpec animationSpec

The animation parameters.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default static @NonNull DynamicBuilders.DynamicFloat animate(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey
)

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
@NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey

The data source to a DynamicDataValue with a float value.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default static @NonNull DynamicBuilders.DynamicFloat animate(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey,
    @NonNull AnimationParameterBuilders.AnimationSpec animationSpec
)

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
@NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey

The source key to a DynamicDataValue with a float value.

@NonNull AnimationParameterBuilders.AnimationSpec animationSpec

The animation parameters.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default static @NonNull DynamicBuilders.DynamicFloat animate(float start, float end)

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

Parameters
float start

The start value of the range.

float end

The end value of the range.

animate

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default static @NonNull DynamicBuilders.DynamicFloat animate(
    float start,
    float end,
    @NonNull AnimationParameterBuilders.AnimationSpec animationSpec
)

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

Parameters
float start

The start value of the range.

float end

The end value of the range.

@NonNull AnimationParameterBuilders.AnimationSpec animationSpec

The animation parameters.

asInt

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicInt32 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)

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)
default static @NonNull DynamicBuilders.DynamicFloat constant(float constant)

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)
default @NonNull DynamicBuilders.DynamicFloat div(@NonNull DynamicBuilders.DynamicFloat other)

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
@NonNull DynamicBuilders.DynamicFloat

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

div

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

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
@NonNull DynamicBuilders.DynamicFloat

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

div

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat div(float other)

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
@NonNull DynamicBuilders.DynamicFloat

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

eq

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

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)
default @NonNull DynamicBuilders.DynamicBool eq(float other)

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)
default @NonNull DynamicBuilders.DynamicString format()

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)
default @NonNull DynamicBuilders.DynamicString format(@NonNull DynamicBuilders.DynamicFloat.FloatFormatter formatter)

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
@NonNull DynamicBuilders.DynamicFloat.FloatFormatter formatter

The formatting parameter.

from

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default static @NonNull DynamicBuilders.DynamicFloat from(
    @NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey
)

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

Parameters
@NonNull DynamicDataKey<DynamicBuilders.DynamicFloat> dynamicDataKey

The data source to a DynamicDataValue with a float value.

fromByteArray

Added in 1.0.0
default static @NonNull DynamicBuilders.DynamicFloat fromByteArray(@NonNull byte[] byteArray)

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
default static @NonNull DynamicBuilders.DynamicFloat fromByteArray(@NonNull byte[] byteArray, int offset, int length)

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)
default @NonNull DynamicBuilders.DynamicBool gt(@NonNull DynamicBuilders.DynamicFloat other)

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)
default @NonNull DynamicBuilders.DynamicBool gt(float other)

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)
default @NonNull DynamicBuilders.DynamicBool gte(@NonNull DynamicBuilders.DynamicFloat other)

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)
default @NonNull DynamicBuilders.DynamicBool gte(float other)

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)
default @NonNull DynamicBuilders.DynamicBool lt(@NonNull DynamicBuilders.DynamicFloat other)

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)
default @NonNull DynamicBuilders.DynamicBool lt(float other)

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)
default @NonNull DynamicBuilders.DynamicBool lte(@NonNull DynamicBuilders.DynamicFloat other)

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)
default @NonNull DynamicBuilders.DynamicBool lte(float other)

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)
default @NonNull DynamicBuilders.DynamicFloat minus(@NonNull DynamicBuilders.DynamicFloat other)

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
@NonNull DynamicBuilders.DynamicFloat

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

minus

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

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
@NonNull DynamicBuilders.DynamicFloat

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

minus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat minus(float other)

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
@NonNull DynamicBuilders.DynamicFloat

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

ne

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

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)
default @NonNull DynamicBuilders.DynamicBool ne(float other)

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)
default static @NonNull ConditionScopes.ConditionScope<DynamicBuilders.DynamicFloatFloatonCondition(@NonNull DynamicBuilders.DynamicBool condition)

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)
default @NonNull DynamicBuilders.DynamicFloat plus(@NonNull DynamicBuilders.DynamicFloat other)

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
@NonNull DynamicBuilders.DynamicFloat

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

plus

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

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
@NonNull DynamicBuilders.DynamicFloat

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

plus

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat plus(float other)

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
@NonNull DynamicBuilders.DynamicFloat

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

rem

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

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
@NonNull DynamicBuilders.DynamicFloat

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

rem

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

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
@NonNull DynamicBuilders.DynamicFloat

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

rem

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat rem(float other)

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
@NonNull DynamicBuilders.DynamicFloat

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

times

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

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
@NonNull DynamicBuilders.DynamicFloat

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

times

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

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
@NonNull DynamicBuilders.DynamicFloat

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

times

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
default @NonNull DynamicBuilders.DynamicFloat times(float other)

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
@NonNull DynamicBuilders.DynamicFloat

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

toDynamicFloatByteArray

Added in 1.0.0
default @NonNull byte[] toDynamicFloatByteArray()

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

toDynamicFloatByteArray

Added in 1.0.0
default int toDynamicFloatByteArray(@NonNull byte[] byteArray)

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
default int toDynamicFloatByteArray(@NonNull byte[] byteArray, int offset, int length)

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