org.apache.hadoop.conf

## Enum StorageUnit

- java.lang.Object
- - java.lang.Enum<StorageUnit>
  - - org.apache.hadoop.conf.StorageUnit

- All Implemented Interfaces:
    Serializable, Comparable<StorageUnit>

      public enum StorageUnit
      extends Enum<StorageUnit>

  Class that maintains different forms of Storage Units.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BYTES`
    `EB`
    `GB`
    `KB`
    `MB`
    `PB`
    `TB`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract double` | `fromBytes(double value)`
    `abstract double` | `getDefault(double value)`
    `abstract String` | `getLongName()`
    `abstract String` | `getShortName()`
    `abstract String` | `getSuffixChar()`
    `abstract double` | `toBytes(double value)`
    `abstract double` | `toEBs(double value)`
    `abstract double` | `toGBs(double value)`
    `abstract double` | `toKBs(double value)`
    `abstract double` | `toMBs(double value)`
    `abstract double` | `toPBs(double value)`
    `String` | `toString()`
    `abstract double` | `toTBs(double value)`
    `static StorageUnit` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static StorageUnit[]` | `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, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### EB

          public static final StorageUnit EB

    - #### PB

          public static final StorageUnit PB

    - #### TB

          public static final StorageUnit TB

    - #### GB

          public static final StorageUnit GB

    - #### MB

          public static final StorageUnit MB

    - #### KB

          public static final StorageUnit KB

    - #### BYTES

          public static final StorageUnit BYTES

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

    - #### toBytes

          public abstract double toBytes(double value)

    - #### toKBs

          public abstract double toKBs(double value)

    - #### toMBs

          public abstract double toMBs(double value)

    - #### toGBs

          public abstract double toGBs(double value)

    - #### toTBs

          public abstract double toTBs(double value)

    - #### toPBs

          public abstract double toPBs(double value)

    - #### toEBs

          public abstract double toEBs(double value)

    - #### getLongName

          public abstract String getLongName()

    - #### getShortName

          public abstract String getShortName()

    - #### getSuffixChar

          public abstract String getSuffixChar()

    - #### getDefault

          public abstract double getDefault(double value)

    - #### fromBytes

          public abstract double fromBytes(double value)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<StorageUnit>`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.