Enum Class PackExt

java.lang.Object
java.lang.Enum<PackExt>
org.eclipse.jgit.internal.storage.pack.PackExt
All Implemented Interfaces:
Serializable, Comparable<PackExt>, Constable

public enum PackExt extends Enum<PackExt>
A pack file extension.
  • Enum Constant Details

    • 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.
  • Field Details

    • ext

      private final String ext
  • Constructor Details

    • PackExt

      private PackExt(String ext)
  • Method Details

    • values

      public static PackExt[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PackExt valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - 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.g 1 << getPosition().
      Returns:
      the bit mask of the extension e.g 1 << getPosition().
    • toString

      public String toString()
      Overrides:
      toString in class Enum<PackExt>