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 voidclear()booleancontainsContained(Locatable key)Test if this contains an object that is contained by 'key'booleancontainsKey(Interval key)booleancontainsKey(Object object)booleancontainsOverlapping(Locatable key)Test overlapping intervalIntervalTree<T>debugGetTree(String sequence)Set<Map.Entry<Interval,T>>entrySet()booleanequals(Object o)Tget(Interval key)Tget(Object object)Collection<T>getContained(Locatable key)Collection<T>getOverlapping(Locatable key)inthashCode()booleanisEmpty()Tput(Interval key, T value)Tremove(Interval key)Tremove(Object object)intsize()-
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:
containsKeyin interfaceMap<Interval,T>- Overrides:
containsKeyin 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)
-
-