it.jnrpe.utils.thresholds
Enum Prefixes

java.lang.Object
  extended by java.lang.Enum<Prefixes>
      extended by it.jnrpe.utils.thresholds.Prefixes
All Implemented Interfaces:
Serializable, Comparable<Prefixes>

public enum Prefixes
extends Enum<Prefixes>


Enum Constant Summary
atto
          Atto : 10^-18.
centi
          Centi : 10^-2.
deci
          Deci : 10^-1.
deka
          Deka : 10^1.
exa
          Exa : 10^28.
exbi
          Exbi: 2^60.
femto
          Femto : 10^-15.
gibi
          Gibi: 2^30.
giga
          Giga : 10^9.
hecto
          Hecto : 10^2.
kibi
          Kibi: 2^10.
kilo
          Kilo : 10^3.
mebi
          Mebi: 2^20.
mega
          Mega : 10^6.
micro
          Micro : 10^-6.
milli
          Milli : 10^-3.
nano
          Nano : 10^-9.
pebi
          Pebi: 2^50.
peta
          Peta : 10^15.
pico
          Pico : 10^-12.
tebi
          Tebi: 2^40.
tera
          Tera : 10^12.
yocto
          Yocto : 10^-24.
yotta
          Yotta : 10^24.
zepto
          Zepto : 10^-21.
zetta
          Zetta : 10^21.
 
Method Summary
 BigDecimal convert(BigDecimal value)
          Multiplies the value with the multiplier associated with this prefix.
 BigDecimal convert(double value)
          Multiplies the value with the multiplier associated with this prefix.
 BigDecimal convert(int value)
          Multiplies the value with the multiplier associated with this prefix.
 BigDecimal convert(long value)
          Multiplies the value with the multiplier associated with this prefix.
static Prefixes fromChar(char prefixChar)
          Creates the enumeration from its prefix string.
static Prefixes fromString(String prefixString)
          Returns the enumeration relative to the passed in prefix or string.
static Prefixes valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Prefixes[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

yotta

public static final Prefixes yotta
Yotta : 10^24. You can use both yotta or Y (case sensitive) as unit of prefix.


zetta

public static final Prefixes zetta
Zetta : 10^21. You can use both zetta or Z (case sensitive) as unit of prefix.


exa

public static final Prefixes exa
Exa : 10^28. You can use both exa or E (case sensitive) as unit of prefix.


peta

public static final Prefixes peta
Peta : 10^15. You can use both peta or P (case sensitive) as unit of prefix.


tera

public static final Prefixes tera
Tera : 10^12. You can use both tera or T (case sensitive) as unit of prefix.


giga

public static final Prefixes giga
Giga : 10^9. You can use both giga or G (case sensitive) as unit of prefix.


mega

public static final Prefixes mega
Mega : 10^6. You can use both mega or M (case sensitive) as unit of prefix.


kilo

public static final Prefixes kilo
Kilo : 10^3. You can use both kilo or k (case sensitive) as unit of prefix.


hecto

public static final Prefixes hecto
Hecto : 10^2. You can use both hecto or h (case sensitive) as unit of prefix.


deka

public static final Prefixes deka
Deka : 10^1. You can use both deka or da (case sensitive) as unit of prefix.


deci

public static final Prefixes deci
Deci : 10^-1. You can use both deci or d (case sensitive) as unit of prefix.


centi

public static final Prefixes centi
Centi : 10^-2. You can use both centi or c (case sensitive) as unit of prefix.


milli

public static final Prefixes milli
Milli : 10^-3. You can use both milli or m (case sensitive) as unit of prefix.


micro

public static final Prefixes micro
Micro : 10^-6. You can use both micro or u (case sensitive) as unit of prefix.


nano

public static final Prefixes nano
Nano : 10^-9. You can use both nano or n (case sensitive) as unit of prefix.


pico

public static final Prefixes pico
Pico : 10^-12. You can use both pico or p (case sensitive) as unit of prefix.


femto

public static final Prefixes femto
Femto : 10^-15. You can use both femto or f (case sensitive) as unit of prefix.


atto

public static final Prefixes atto
Atto : 10^-18. You can use both atto or a (case sensitive) as unit of prefix.


zepto

public static final Prefixes zepto
Zepto : 10^-21. You can use both zepto or z (case sensitive) as unit of prefix.


yocto

public static final Prefixes yocto
Yocto : 10^-24. You can use both yocto or y (case sensitive) as unit of prefix.


kibi

public static final Prefixes kibi
Kibi: 2^10. You can use both kibi or Ki (case sensitive) as unit of prefix.


mebi

public static final Prefixes mebi
Mebi: 2^20. You can use both mebi or Mi (case sensitive) as unit of prefix.


gibi

public static final Prefixes gibi
Gibi: 2^30. You can use both gibi or Gi (case sensitive) as unit of prefix.


tebi

public static final Prefixes tebi
Tebi: 2^40. You can use both tebi or Ti (case sensitive) as unit of prefix.


pebi

public static final Prefixes pebi
Pebi: 2^50. You can use both pebi or Pi (case sensitive) as unit of prefix.


exbi

public static final Prefixes exbi
Exbi: 2^60. You can use both exbi or Ei (case sensitive) as unit of prefix.

Method Detail

values

public static Prefixes[] 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 (Prefixes c : Prefixes.values())
    System.out.println(c);

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

valueOf

public static Prefixes 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

convert

public BigDecimal convert(BigDecimal value)
Multiplies the value with the multiplier associated with this prefix.

Parameters:
value - The value
Returns:
The multiplied value

convert

public BigDecimal convert(int value)
Multiplies the value with the multiplier associated with this prefix.

Parameters:
value - The value
Returns:
The multiplied value

convert

public BigDecimal convert(long value)
Multiplies the value with the multiplier associated with this prefix.

Parameters:
value - The value
Returns:
The multiplied value

convert

public BigDecimal convert(double value)
Multiplies the value with the multiplier associated with this prefix.

Parameters:
value - The value
Returns:
The multiplied value

fromChar

public static Prefixes fromChar(char prefixChar)
Creates the enumeration from its prefix string.

Parameters:
prefixChar - The prefix
Returns:
The enumeration

fromString

public static Prefixes fromString(String prefixString)
Returns the enumeration relative to the passed in prefix or string.

Parameters:
prefixString - The prefix
Returns:
The enumeration


Copyright © 2014. All Rights Reserved.