Package htsjdk.tribble.index
Enum IndexFactory.IndexType
- java.lang.Object
-
- java.lang.Enum<IndexFactory.IndexType>
-
- htsjdk.tribble.index.IndexFactory.IndexType
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexFactory.IndexType>
- Enclosing class:
- IndexFactory
public static enum IndexFactory.IndexType extends Enum<IndexFactory.IndexType>
an enum that contains all of the information about the index types, and how to create them
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INTERVAL_TREE
LINEAR
TABIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreate()
Index
createIndex(InputStream in)
int
getDefaultBinSize()
static IndexFactory.IndexType
getIndexType(BufferedInputStream is)
int
getMagicNumber()
Integer
getTribbleIndexType()
static IndexFactory.IndexType
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexFactory.IndexType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINEAR
public static final IndexFactory.IndexType LINEAR
-
INTERVAL_TREE
public static final IndexFactory.IndexType INTERVAL_TREE
-
TABIX
public static final IndexFactory.IndexType TABIX
-
-
Method Detail
-
values
public static IndexFactory.IndexType[] 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 (IndexFactory.IndexType c : IndexFactory.IndexType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexFactory.IndexType 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
-
getDefaultBinSize
public int getDefaultBinSize()
-
canCreate
public boolean canCreate()
-
getTribbleIndexType
public Integer getTribbleIndexType()
-
createIndex
public Index createIndex(InputStream in)
-
getMagicNumber
public int getMagicNumber()
-
getIndexType
public static IndexFactory.IndexType getIndexType(BufferedInputStream is)
- Parameters:
is
- InputStream of index. This will be reset to location it was at when method was invoked.- Returns:
- The
IndexType
based on theheaderValue
- Throws:
TribbleException.UnableToCreateCorrectIndexType
-
-