public enum TrafficUnit extends Enum<TrafficUnit>
| 枚举常量和说明 |
|---|
B
Traffic unit
|
GB
Time unit representing one second
|
KB
Time unit representing one thousandth of a millisecond
|
MB
Time unit representing one thousandth of a second
|
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) static long |
C0 |
(专用程序包) static long |
C1 |
(专用程序包) static long |
C2 |
(专用程序包) static long |
C3 |
(专用程序包) static long |
MAX |
| 限定符和类型 | 方法和说明 |
|---|---|
double |
convert(double sourceDuration,
TrafficUnit sourceUnit) |
static boolean |
isB(TrafficUnit trafficUnit) |
static boolean |
isGB(TrafficUnit trafficUnit) |
static boolean |
isKB(TrafficUnit trafficUnit) |
static boolean |
isMB(TrafficUnit trafficUnit) |
static TrafficUnit |
ofName(String name) |
double |
toB(double duration) |
double |
toGB(double duration) |
double |
toKB(double duration) |
double |
toMB(double duration) |
static TrafficUnit |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static TrafficUnit[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
(专用程序包) static double |
x(double d,
long m,
long over) |
public static final TrafficUnit B
public static final TrafficUnit KB
public static final TrafficUnit MB
public static final TrafficUnit GB
static final long C0
static final long C1
static final long C2
static final long C3
static final long MAX
public static TrafficUnit[] values()
for (TrafficUnit c : TrafficUnit.values()) System.out.println(c);
public static TrafficUnit valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值static double x(double d,
long m,
long over)
public double convert(double sourceDuration,
TrafficUnit sourceUnit)
public double toB(double duration)
public double toKB(double duration)
public double toMB(double duration)
public double toGB(double duration)
public static TrafficUnit ofName(String name)
public static boolean isB(TrafficUnit trafficUnit)
public static boolean isKB(TrafficUnit trafficUnit)
public static boolean isMB(TrafficUnit trafficUnit)
public static boolean isGB(TrafficUnit trafficUnit)
Copyright © 2023. All rights reserved.