Enum Class ByteSizeUnit

java.lang.Object
java.lang.Enum<ByteSizeUnit>
net.bluemind.utils.ByteSizeUnit
All Implemented Interfaces:
Serializable, Comparable<ByteSizeUnit>, Constable

public enum ByteSizeUnit extends Enum<ByteSizeUnit>
  • Enum Constant Details

  • Method Details

    • values

      public static ByteSizeUnit[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ByteSizeUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toBytes

      public abstract long toBytes(long size)
    • toKB

      public abstract long toKB(long size)
    • toMB

      public abstract long toMB(long size)
    • toGB

      public abstract long toGB(long size)
    • toTB

      public abstract long toTB(long size)
    • toPB

      public abstract long toPB(long size)
    • fromBytes

      public abstract long fromBytes(long size)
    • fromKB

      public abstract long fromKB(long size)
    • fromMB

      public abstract long fromMB(long size)
    • fromGB

      public abstract long fromGB(long size)
    • fromTB

      public abstract long fromTB(long size)
    • fromPB

      public abstract long fromPB(long size)
    • getSuffix

      public abstract String getSuffix()