Skip to main content
Version: SDK 5.0.x

Enum Class Unit

An enum describing how to interpret the value of an AppEvent.

public enum Unit
extends Enum<Unit>
Inheritance

java.lang.Objectjava.lang.Enum<Unit> ← io.justtrack.Unit

All Implemented Interfaces

Serializable, Comparable<Unit>, Constable

Enum.EnumDesc<E extends Enum<E>>

Enum Constants

COUNT

public static final Unit COUNT

We want to count how many times something happened in total.

MILLISECONDS

public static final Unit MILLISECONDS

We want to measure how long something takes with millisecond precision.

SECONDS

public static final Unit SECONDS

We want to measure how long something takes with second precision.

Methods

toString

@NonNull
public String toString()

Overrides

toString in class Enum<Unit>

valueOf

public static Unit valueOf(String name)

Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters

NameDescription
namethe name of the enum constant to be returned.

Returns

the enum constant with the specified name

Throws

NameDescription
IllegalArgumentExceptionif this enum class has no constant with the specified name
NullPointerExceptionif the argument is null

values

public static Unit[] values()

Returns an array containing the constants of this enum class, in the order they are declared.

Returns

an array containing the constants of this enum class, in the order they are declared