Package com.github.junrar.rarfile
Enum RARVersion
- java.lang.Object
-
- java.lang.Enum<RARVersion>
-
- com.github.junrar.rarfile.RARVersion
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RARVersion>
public enum RARVersion extends java.lang.Enum<RARVersion>
Known versions of the rar file format.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateRARVersion()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisOldFormat(RARVersion version)Checks if the version passed is the old rar format.static RARVersionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static RARVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OLD
public static final RARVersion OLD
-
V4
public static final RARVersion V4
-
V5
public static final RARVersion V5
-
-
Method Detail
-
values
public static RARVersion[] 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 (RARVersion c : RARVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RARVersion 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
-
isOldFormat
public static boolean isOldFormat(RARVersion version)
Checks if the version passed is the old rar format.- Parameters:
version- Version to check if it is the old format.- Returns:
trueif the format is the old format. Otherwise false.
-
-