Class PackExt
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.pack.PackExt
-
public class PackExt extends java.lang.ObjectA pack file extension.
-
-
Field Summary
Fields Modifier and Type Field Description static PackExtBITMAP_INDEXA pack bitmap index file extension.private java.lang.Stringextstatic PackExtINDEXA pack index file extension.static PackExtKEEPA keep pack file extension.static PackExtPACKA pack file extension.private intposstatic PackExtREFTABLEA reftable file.private static PackExt[]VALUES
-
Constructor Summary
Constructors Modifier Constructor Description privatePackExt(java.lang.String ext, int pos)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBit()Get the bit mask of the extension e.g1 << getPosition().java.lang.StringgetExtension()Get the file extension.intgetPosition()Get the position of the extension in the values array.static PackExtnewPackExt(java.lang.String ext)Returns a PackExt for the file extension and registers it in the values array.java.lang.StringtoString()static PackExt[]values()Get all of the PackExt values.
-
-
-
Field Detail
-
VALUES
private static volatile PackExt[] VALUES
-
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.
-
ext
private final java.lang.String ext
-
pos
private final int pos
-
-
Method Detail
-
values
public static PackExt[] values()
Get all of the PackExt values.- Returns:
- all of the PackExt values.
-
newPackExt
public static PackExt newPackExt(java.lang.String ext)
Returns a PackExt for the file extension and registers it in the values array.- Parameters:
ext- the file extension.- Returns:
- the PackExt for the ext
-
getExtension
public java.lang.String getExtension()
Get the file extension.- Returns:
- the file extension.
-
getPosition
public int getPosition()
Get the position of the extension in the values array.- Returns:
- the position of the extension in the values array.
-
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().
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-