Class PackExt
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.pack.PackExt
-
public class PackExt extends java.lang.Object
A pack file extension.
-
-
Field Summary
Fields Modifier and Type Field Description static PackExt
BITMAP_INDEX
A pack bitmap index file extension.private java.lang.String
ext
static PackExt
INDEX
A pack index file extension.static PackExt
KEEP
A keep pack file extension.static PackExt
PACK
A pack file extension.private int
pos
static PackExt
REFTABLE
A reftable file.private static PackExt[]
VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
PackExt(java.lang.String ext, int pos)
-
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()
.java.lang.String
getExtension()
Get the file extension.int
getPosition()
Get the position of the extension in the values array.static PackExt
newPackExt(java.lang.String ext)
Returns a PackExt for the file extension and registers it in the values array.java.lang.String
toString()
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:
toString
in classjava.lang.Object
-
-