Package htsjdk.samtools.util
Class IntervalTreeMap<T>
- java.lang.Object
-
- java.util.AbstractMap<Interval,T>
-
- htsjdk.samtools.util.IntervalTreeMap<T>
-
public class IntervalTreeMap<T> extends AbstractMap<Interval,T>
Utility class that implements an interval map. This class functions as a java map but also supports efficient interval overlap queries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description IntervalTreeMap()
IntervalTreeMap(Map<? extends Interval,? extends T> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsContained(Locatable key)
Test if this contains an object that is contained by 'key'boolean
containsKey(Interval key)
boolean
containsKey(Object object)
boolean
containsOverlapping(Locatable key)
Test overlapping intervalIntervalTree<T>
debugGetTree(String sequence)
Set<Map.Entry<Interval,T>>
entrySet()
boolean
equals(Object o)
T
get(Interval key)
T
get(Object object)
Collection<T>
getContained(Locatable key)
Collection<T>
getOverlapping(Locatable key)
int
hashCode()
boolean
isEmpty()
T
put(Interval key, T value)
T
remove(Interval key)
T
remove(Object object)
int
size()
-
Methods inherited from class java.util.AbstractMap
clone, containsValue, keySet, putAll, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
debugGetTree
public IntervalTree<T> debugGetTree(String sequence)
-
clear
public void clear()
-
containsKey
public boolean containsKey(Object object)
- Specified by:
containsKey
in interfaceMap<Interval,T>
- Overrides:
containsKey
in classAbstractMap<Interval,T>
-
containsKey
public boolean containsKey(Interval key)
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsOverlapping
public boolean containsOverlapping(Locatable key)
Test overlapping interval- Parameters:
key
- the Locatable- Returns:
- true if it contains an object overlapping the interval
-
getOverlapping
public Collection<T> getOverlapping(Locatable key)
-
containsContained
public boolean containsContained(Locatable key)
Test if this contains an object that is contained by 'key'- Parameters:
key
- the Locatable- Returns:
- true if it contains an object is contained by 'key'
-
getContained
public Collection<T> getContained(Locatable key)
-
-