DataTypeCondition

public final class DataTypeCondition extends ProtoParcelable

Object
   ↳ ProtoParcelable
     ↳ DataTypeCondition

A condition which is considered met when a data type value passes a defined threshold.

Summary

Public constructors

DataTypeCondition(
    DataType dataType,
    Value threshold,
    ComparisonType comparisonType
)

Public methods

final boolean

Checks whether or not the condition is satisfied by a given DataPoint.

final boolean

Checks whether or not the value of the condition is satisfied by a given Value.

@NonNull String

Inherited methods

From class ProtoParcelable
int
boolean
equals(Object other)
int
void
writeToParcel(Parcel dest, int flags)

Public fields

comparisonType

public final @NonNull ComparisonType comparisonType

dataType

public final @NonNull DataType dataType

threshold

public final @NonNull Value threshold

Public constructors

DataTypeCondition

public final DataTypeCondition(
    DataType dataType,
    Value threshold,
    ComparisonType comparisonType
)

Public methods

isSatisfied

public final boolean isSatisfied(DataPoint dataPoint)

Checks whether or not the condition is satisfied by a given DataPoint.

isThresholdSatisfied

public final boolean isThresholdSatisfied(Value value)

Checks whether or not the value of the condition is satisfied by a given Value.

toString

public @NonNull String toString()