public interface

DynamicBuilders.DynamicString

implements DynamicBuilders.DynamicType

 androidx.wear.protolayout.expression.DynamicBuilders.DynamicString

Overview

Interface defining a dynamic string type.

DynamicBuilders.DynamicString string value is subject to being truncated if it's too long.

Summary

Methods
public DynamicBuilders.DynamicStringconcat(DynamicBuilders.DynamicString other)

Returns a new DynamicBuilders.DynamicString that has the result of concatenating this DynamicBuilders.DynamicString with other.

public static DynamicBuilders.DynamicStringconstant(java.lang.String constant)

Creates a constant-valued DynamicBuilders.DynamicString.

public static DynamicBuilders.DynamicStringfrom(DynamicDataKey<DynamicBuilders.DynamicString> dynamicDataKey)

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

public static DynamicBuilders.DynamicStringfromByteArray(byte[] byteArray[])

Creates a DynamicBuilders.DynamicString from a byte array generated by DynamicBuilders.DynamicString.toDynamicStringByteArray().

public static DynamicBuilders.DynamicStringfromByteArray(byte[] byteArray[], int offset, int length)

Creates a DynamicBuilders.DynamicString from the provided byte array at the provided offset and length, that was generated by one of the DynamicBuilders.DynamicString.toDynamicStringByteArray() overloads.

public FingerprintgetFingerprint()

Get the fingerprint for this object or null if unknown.

public static ConditionScopes.ConditionScope<DynamicBuilders.DynamicString, java.lang.String>onCondition(DynamicBuilders.DynamicBool condition)

Creates a DynamicBuilders.DynamicString that is bound to the result of a conditional expression.

public byte[]toDynamicStringByteArray()

Serializes the DynamicBuilders.DynamicString into a new byte array that can later be used with DynamicBuilders.DynamicString.fromByteArray(byte[]).

public inttoDynamicStringByteArray(byte[] byteArray[])

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

public inttoDynamicStringByteArray(byte[] byteArray[], int offset, int length)

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

public DynamicProto.DynamicStringtoDynamicStringProto()

Get the protocol buffer representation of this object, without fingerprint.

public DynamicProto.DynamicStringtoDynamicStringProto(boolean withFingerprint)

Get the protocol buffer representation of this object, with or without fingerprint.

Methods

public DynamicProto.DynamicString toDynamicStringProto()

Get the protocol buffer representation of this object, without fingerprint.

public DynamicProto.DynamicString toDynamicStringProto(boolean withFingerprint)

Get the protocol buffer representation of this object, with or without fingerprint.

public static DynamicBuilders.DynamicString fromByteArray(byte[] byteArray[])

Creates a DynamicBuilders.DynamicString from a byte array generated by DynamicBuilders.DynamicString.toDynamicStringByteArray().

public static DynamicBuilders.DynamicString fromByteArray(byte[] byteArray[], int offset, int length)

Creates a DynamicBuilders.DynamicString from the provided byte array at the provided offset and length, that was generated by one of the DynamicBuilders.DynamicString.toDynamicStringByteArray() overloads.

public byte[] toDynamicStringByteArray()

Serializes the DynamicBuilders.DynamicString into a new byte array that can later be used with DynamicBuilders.DynamicString.fromByteArray(byte[]).

public int toDynamicStringByteArray(byte[] byteArray[])

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

public int toDynamicStringByteArray(byte[] byteArray[], int offset, int length)

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

public static DynamicBuilders.DynamicString constant(java.lang.String constant)

Creates a constant-valued DynamicBuilders.DynamicString. The resulted DynamicBuilders.DynamicString is subject to being truncated if it's too long.

public static DynamicBuilders.DynamicString from(DynamicDataKey<DynamicBuilders.DynamicString> dynamicDataKey)

Creates a DynamicBuilders.DynamicString that is bound to the value of an item of the State. The resulted DynamicBuilders.DynamicString is subject to being truncated if it's too long.

Parameters:

dynamicDataKey: The source key to a DynamicDataBuilders.DynamicDataValue with a string value.

public static ConditionScopes.ConditionScope<DynamicBuilders.DynamicString, java.lang.String> onCondition(DynamicBuilders.DynamicBool condition)

Creates a DynamicBuilders.DynamicString that is bound to the result of a conditional expression. It will use the value given in either ConditionScopes.ConditionScope.use(T) or ConditionScopes.IfTrueScope.elseUse(T) depending on the value yielded from condition.

Parameters:

condition: The value used for evaluting this condition.

Returns a new DynamicBuilders.DynamicString that has the result of concatenating this DynamicBuilders.DynamicString with other. i.e. result = this + other The resulted DynamicBuilders.DynamicString is subject to being truncated if it's too long.

Parameters:

other: The right hand side operand of the concatenation.

public Fingerprint getFingerprint()

Get the fingerprint for this object or null if unknown.