public final class PlainComplicationText implements ComplicationText


A ComplicationText that contains plain text.

Summary

Nested types

A builder for PlainComplicationText.

Public methods

boolean
equals(Object other)
@NonNull Instant

Returns the next time after afterInstant at which the text may change.

@NonNull CharSequence
getTextAt(@NonNull Resources resources, @NonNull Instant instant)

Returns the text that should be displayed for the given timestamp.

int
boolean
boolean
returnsSameText(
    @NonNull Instant firstInstant,
    @NonNull Instant secondInstant
)

Returns true if the result of getTextAt will be the same for both firstInstant and secondInstant.

@NonNull String

Public methods

equals

public boolean equals(Object other)

getNextChangeTime

Added in 1.3.0-alpha04
public @NonNull Instant getNextChangeTime(@NonNull Instant afterInstant)

Returns the next time after afterInstant at which the text may change.

getTextAt

Added in 1.3.0-alpha04
public @NonNull CharSequence getTextAt(@NonNull Resources resources, @NonNull Instant instant)

Returns the text that should be displayed for the given timestamp.

Parameters
@NonNull Resources resources

Resources from the current context

@NonNull Instant instant

The Instant at which to sample the text

hashCode

public int hashCode()

isAlwaysEmpty

Added in 1.3.0-alpha04
public boolean isAlwaysEmpty()

returnsSameText

Added in 1.3.0-alpha04
public boolean returnsSameText(
    @NonNull Instant firstInstant,
    @NonNull Instant secondInstant
)

Returns true if the result of getTextAt will be the same for both firstInstant and secondInstant.

toString

public @NonNull String toString()