T - public class IndexDefault<T extends IndexElement> extends Object implements Index<T>
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,T> |
mapById |
protected TreeMap<Integer,T> |
mapByNum |
protected TreeMap<Integer,T> |
mapByRawNum |
| Constructor and Description |
|---|
IndexDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T indexElement)
Add a
IndexElement to the index. |
T |
getById(String id)
Retrieves a value by the textual ID of a scan.
|
T |
getByNum(int num)
Retrieves a value by the internal scan number.
|
T |
getByRawNum(int num)
Retrieves a value by the raw scan number from the original file.
|
Map<String,T> |
getMapById()
A mapping from textual scan IDs.
|
NavigableMap<Integer,T> |
getMapByNum()
A mapping from internal scan numbers.
|
NavigableMap<Integer,T> |
getMapByRawNum()
A mapping from original raw scan numbers (or "spectrum index" values in mzML).
|
int |
size()
Current size of the index.
|
protected final TreeMap<Integer,T extends IndexElement> mapByNum
protected volatile TreeMap<Integer,T extends IndexElement> mapByRawNum
protected volatile HashMap<String,T extends IndexElement> mapById
public NavigableMap<Integer,T> getMapByNum()
IndexgetMapByNum in interface Index<T extends IndexElement>public NavigableMap<Integer,T> getMapByRawNum()
IndexgetMapByRawNum in interface Index<T extends IndexElement>public Map<String,T> getMapById()
IndexIndexElement.getRawNumber().getMapById in interface Index<T extends IndexElement>public int size()
Indexsize in interface Index<T extends IndexElement>public void add(T indexElement)
IndexElement to the index.
Don't use this method, unless you're building a new index.add in interface Index<T extends IndexElement>indexElement - scan index element implementationpublic T getByNum(int num)
IndexgetByNum in interface Index<T extends IndexElement>public T getByRawNum(int num)
IndexgetByRawNum in interface Index<T extends IndexElement>num - raw scan number from the original fileCopyright © 2017. All rights reserved.