Enum PackExt

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PackExt>

    public enum PackExt
    extends java.lang.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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String ext  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PackExt​(java.lang.String ext)  
    • 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.g 1 << getPosition().
      java.lang.String getExtension()
      Get the file extension.
      int getPosition()
      Get the position of the extension in the enum declaration.
      java.lang.String toString()
      static PackExt valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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.
    • Field Detail

      • ext

        private final java.lang.String ext
    • Constructor Detail

      • PackExt

        private PackExt​(java.lang.String ext)
    • 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​(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 name
        java.lang.NullPointerException - if the argument is null
      • 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 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<PackExt>