public enum Metrics extends Enum<Metrics> implements Metric
Metric
s.Enum Constant and Description |
---|
KILOMETERS |
MILES |
NEUTRAL |
Modifier and Type | Method and Description |
---|---|
String |
getAbbreviation()
Returns the scientific abbreviation of the unit the
Metric is in. |
double |
getMultiplier()
Returns the multiplier to calculate metrics values from a base scale.
|
static Metrics |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Metrics[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Metrics KILOMETERS
public static final Metrics MILES
public static final Metrics NEUTRAL
public static Metrics[] values()
for (Metrics c : Metrics.values()) System.out.println(c);
public static Metrics valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic double getMultiplier()
Metric
getMultiplier
in interface Metric
public String getAbbreviation()
Metric
Metric
is in.getAbbreviation
in interface Metric
Copyright © 2011-2016–2017 Pivotal Software, Inc.. All rights reserved.