Package com.saperion.util
Enum FileSizeCalcer.CalcFactor
- java.lang.Object
-
- java.lang.Enum<FileSizeCalcer.CalcFactor>
-
- com.saperion.util.FileSizeCalcer.CalcFactor
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FileSizeCalcer.CalcFactor>
- Enclosing class:
- FileSizeCalcer
public static enum FileSizeCalcer.CalcFactor extends java.lang.Enum<FileSizeCalcer.CalcFactor>
This enumeration defines the devision factors used by the FileSizeCalcer.- Author:
- sts
-
-
Enum Constant Summary
Enum Constants Enum Constant Description KIBI_FACTOR
1024.KILO_FACTOR
1000.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
factor()
Returns the devision factor.static FileSizeCalcer.CalcFactor
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FileSizeCalcer.CalcFactor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KIBI_FACTOR
public static final FileSizeCalcer.CalcFactor KIBI_FACTOR
1024. This is the valid factor for file system based file size calculation.
-
KILO_FACTOR
public static final FileSizeCalcer.CalcFactor KILO_FACTOR
1000. This is the valid factor for data transmission based file size calculation.
-
-
Method Detail
-
values
public static FileSizeCalcer.CalcFactor[] 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 (FileSizeCalcer.CalcFactor c : FileSizeCalcer.CalcFactor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileSizeCalcer.CalcFactor valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
factor
public int factor()
Returns the devision factor.- Returns:
- the devision factor.
-
-