Package org.dellroad.lzma.client
Enum CompressionMode
- java.lang.Object
-
- java.lang.Enum<CompressionMode>
-
- org.dellroad.lzma.client.CompressionMode
-
- All Implemented Interfaces:
Serializable,Comparable<CompressionMode>
public enum CompressionMode extends Enum<CompressionMode>
Represents LZMA compression modes, from 1 (fastest compression) to 9 (best compression).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompressionModeget(int level)The the instance corresponding to the integerlevel.intgetLevel()Return the integer level number corresponding to this instance.static CompressionModevalueOf(String name)Returns the enum constant of this type with the specified name.static CompressionMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MODE_1
public static final CompressionMode MODE_1
-
MODE_2
public static final CompressionMode MODE_2
-
MODE_3
public static final CompressionMode MODE_3
-
MODE_4
public static final CompressionMode MODE_4
-
MODE_5
public static final CompressionMode MODE_5
-
MODE_6
public static final CompressionMode MODE_6
-
MODE_7
public static final CompressionMode MODE_7
-
MODE_8
public static final CompressionMode MODE_8
-
MODE_9
public static final CompressionMode MODE_9
-
-
Method Detail
-
values
public static CompressionMode[] 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 (CompressionMode c : CompressionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionMode 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 nameNullPointerException- if the argument is null
-
getLevel
public int getLevel()
Return the integer level number corresponding to this instance.- Returns:
- a value from 1 to 9
- See Also:
get()
-
get
public static CompressionMode get(int level)
The the instance corresponding to the integerlevel.- Parameters:
level- value from 1 (fastest) to 9 (best)- Throws:
IllegalArgumentException- ifmodeis invalid- See Also:
getLevel()
-
-