@Test public void smoke() { List<KeyInterval> intervals = new ArrayList<>(); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, (byte)200 }), new HashKey(new byte[] { 0, (byte)241 }))); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, 50 }), new HashKey(new byte[] { 0, 75 }))); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, 50 }), new HashKey(new byte[] { 0, 90 }))); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, 25 }), new HashKey(new byte[] { 0, 49 }))); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, 25 }), new HashKey(new byte[] { 0, 49 }))); intervals.add(new KeyInterval(new HashKey(new byte[] { 0, (byte)128 }), new HashKey(new byte[] { 0, (byte)175 }))); CombinedIntervals combined = new CombinedIntervals(intervals); List<KeyInterval> compressed = combined.getIntervals(); System.out.println(compressed); assertEquals(4, compressed.size()); }
public List<KeyInterval> getIntervals() { return intervals; }
CombinedIntervals implements Predicate<HASH> { public List<KeyInterval> getIntervals() { return intervals; } }
CombinedIntervals implements Predicate<HASH> { public List<KeyInterval> getIntervals() { return intervals; } CombinedIntervals(List<KeyInterval> allIntervals); }
CombinedIntervals implements Predicate<HASH> { public List<KeyInterval> getIntervals() { return intervals; } CombinedIntervals(List<KeyInterval> allIntervals); List<KeyInterval> getIntervals(); @Override boolean test(HASH t); List<Interval> toIntervals(); @Override String toString(); }
CombinedIntervals implements Predicate<HASH> { public List<KeyInterval> getIntervals() { return intervals; } CombinedIntervals(List<KeyInterval> allIntervals); List<KeyInterval> getIntervals(); @Override boolean test(HASH t); List<Interval> toIntervals(); @Override String toString();  }