다음을 통해 공유


Unit Class

public final class Unit
extends ExpandableStringEnum<Unit>

The unit of the metric.

Field Summary

Modifier and Type Field and Description
static final Unit BITS_PER_SECOND

Static value BitsPerSecond for Unit.

static final Unit BYTES

Static value Bytes for Unit.

static final Unit BYTES_PER_SECOND

Static value BytesPerSecond for Unit.

static final Unit BYTE_SECONDS

Static value ByteSeconds for Unit.

static final Unit CORES

Static value Cores for Unit.

static final Unit COUNT

Static value Count for Unit.

static final Unit COUNT_PER_SECOND

Static value CountPerSecond for Unit.

static final Unit MILLI_CORES

Static value MilliCores for Unit.

static final Unit MILLI_SECONDS

Static value MilliSeconds for Unit.

static final Unit NANO_CORES

Static value NanoCores for Unit.

static final Unit PERCENT

Static value Percent for Unit.

static final Unit SECONDS

Static value Seconds for Unit.

static final Unit UNSPECIFIED

Static value Unspecified for Unit.

Constructor Summary

Constructor Description
Unit()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of Unit value.

Method Summary

Modifier and Type Method and Description
static Unit fromString(String name)

Creates or finds a Unit from its string representation.

static Collection<Unit> values()

Gets known Unit values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

BITS_PER_SECOND

public static final Unit BITS_PER_SECOND

Static value BitsPerSecond for Unit.

BYTES

public static final Unit BYTES

Static value Bytes for Unit.

BYTES_PER_SECOND

public static final Unit BYTES_PER_SECOND

Static value BytesPerSecond for Unit.

BYTE_SECONDS

public static final Unit BYTE_SECONDS

Static value ByteSeconds for Unit.

CORES

public static final Unit CORES

Static value Cores for Unit.

COUNT

public static final Unit COUNT

Static value Count for Unit.

COUNT_PER_SECOND

public static final Unit COUNT_PER_SECOND

Static value CountPerSecond for Unit.

MILLI_CORES

public static final Unit MILLI_CORES

Static value MilliCores for Unit.

MILLI_SECONDS

public static final Unit MILLI_SECONDS

Static value MilliSeconds for Unit.

NANO_CORES

public static final Unit NANO_CORES

Static value NanoCores for Unit.

PERCENT

public static final Unit PERCENT

Static value Percent for Unit.

SECONDS

public static final Unit SECONDS

Static value Seconds for Unit.

UNSPECIFIED

public static final Unit UNSPECIFIED

Static value Unspecified for Unit.

Constructor Details

Unit

@Deprecated
public Unit()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of Unit value.

Method Details

fromString

public static Unit fromString(String name)

Creates or finds a Unit from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding Unit.

values

public static Collection values()

Gets known Unit values.

Returns:

known Unit values.

Applies to