org.rhq.core.clientapi.util.units
Enum ScaleConstants

java.lang.Object
  extended by java.lang.Enum<ScaleConstants>
      extended by org.rhq.core.clientapi.util.units.ScaleConstants
All Implemented Interfaces:
Serializable, Comparable<ScaleConstants>

public enum ScaleConstants
extends Enum<ScaleConstants>

Constants that deal with scaling of units.


Enum Constant Summary
SCALE_CELSIUS
           
SCALE_DAY
           
SCALE_FAHRENHEIT
           
SCALE_GIGA
           
SCALE_HOUR
           
SCALE_JIFFY
           
SCALE_KELVIN
           
SCALE_KILO
           
SCALE_MEGA
           
SCALE_MICRO
           
SCALE_MILLI
           
SCALE_MIN
           
SCALE_NANO
           
SCALE_NONE
           
SCALE_PETA
           
SCALE_SEC
           
SCALE_TERA
           
SCALE_WEEK
           
SCALE_YEAR
           
 
Method Summary
static EnumSet<ScaleConstants> getAllScales()
          Return an EnumSet that conatins all SCALE_ enum constants
static EnumSet<ScaleConstants> getBinaryScaleSet()
          Return an EnumSet that contain all SCALE_ enum constants dealing with binary scaling
static ScaleConstants getConstantWithOrdinal(int ord)
          Return the UnitsConstants constant that has ord as its ordinal value
static EnumSet<ScaleConstants> getTemperatureSet()
           
static EnumSet<ScaleConstants> getTimeSet()
          Return an EnumSet that contain all SCALE_ enum constants dealing with time
static ScaleConstants valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ScaleConstants[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SCALE_NONE

public static final ScaleConstants SCALE_NONE

SCALE_KILO

public static final ScaleConstants SCALE_KILO

SCALE_MEGA

public static final ScaleConstants SCALE_MEGA

SCALE_GIGA

public static final ScaleConstants SCALE_GIGA

SCALE_TERA

public static final ScaleConstants SCALE_TERA

SCALE_PETA

public static final ScaleConstants SCALE_PETA

SCALE_YEAR

public static final ScaleConstants SCALE_YEAR

SCALE_WEEK

public static final ScaleConstants SCALE_WEEK

SCALE_DAY

public static final ScaleConstants SCALE_DAY

SCALE_HOUR

public static final ScaleConstants SCALE_HOUR

SCALE_MIN

public static final ScaleConstants SCALE_MIN

SCALE_SEC

public static final ScaleConstants SCALE_SEC

SCALE_JIFFY

public static final ScaleConstants SCALE_JIFFY

SCALE_MILLI

public static final ScaleConstants SCALE_MILLI

SCALE_MICRO

public static final ScaleConstants SCALE_MICRO

SCALE_NANO

public static final ScaleConstants SCALE_NANO

SCALE_KELVIN

public static final ScaleConstants SCALE_KELVIN

SCALE_CELSIUS

public static final ScaleConstants SCALE_CELSIUS

SCALE_FAHRENHEIT

public static final ScaleConstants SCALE_FAHRENHEIT
Method Detail

values

public static ScaleConstants[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ScaleConstants c : ScaleConstants.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

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

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getBinaryScaleSet

public static EnumSet<ScaleConstants> getBinaryScaleSet()
Return an EnumSet that contain all SCALE_ enum constants dealing with binary scaling


getTimeSet

public static EnumSet<ScaleConstants> getTimeSet()
Return an EnumSet that contain all SCALE_ enum constants dealing with time


getTemperatureSet

public static EnumSet<ScaleConstants> getTemperatureSet()

getAllScales

public static EnumSet<ScaleConstants> getAllScales()
Return an EnumSet that conatins all SCALE_ enum constants


getConstantWithOrdinal

public static ScaleConstants getConstantWithOrdinal(int ord)
Return the UnitsConstants constant that has ord as its ordinal value

Parameters:
ord -
Returns:


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.