Enum PackExt
- java.lang.Object
-
- java.lang.Enum<PackExt>
-
- org.eclipse.jgit.internal.storage.pack.PackExt
-
- All Implemented Interfaces:
Serializable
,Comparable<PackExt>
public enum PackExt extends Enum<PackExt>
A pack file extension.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BITMAP_INDEX
A pack bitmap index file extension.INDEX
A pack index file extension.KEEP
A keep pack file extension.PACK
A pack file extension.REFTABLE
A reftable file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBit()
Get the bit mask of the extension e.g1 << getPosition()
.String
getExtension()
Get the file extension.int
getPosition()
Get the position of the extension in the enum declaration.String
toString()
static PackExt
valueOf(String name)
Returns the enum constant of this type with the specified name.static PackExt[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PACK
public static final PackExt PACK
A pack file extension.
-
INDEX
public static final PackExt INDEX
A pack index file extension.
-
KEEP
public static final PackExt KEEP
A keep pack file extension.
-
BITMAP_INDEX
public static final PackExt BITMAP_INDEX
A pack bitmap index file extension.
-
REFTABLE
public static final PackExt REFTABLE
A reftable file.
-
-
Method Detail
-
values
public static PackExt[] 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 (PackExt c : PackExt.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PackExt 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
-
getExtension
public String getExtension()
Get the file extension.- Returns:
- the file extension.
-
getPosition
public int getPosition()
Get the position of the extension in the enum declaration.- Returns:
- the position of the extension in the enum declaration.
-
getBit
public int getBit()
Get the bit mask of the extension e.g1 << getPosition()
.- Returns:
- the bit mask of the extension e.g
1 << getPosition()
.
-
-