@Test(groups = "Functional")
public void testFindOverlaps_nonNested()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 20);
// same range different description
SimpleFeature sf2 = new SimpleFeature(10, 20, "desc");
@Test(groups = "Functional")
public void testFindOverlaps_nested()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 50);
SimpleFeature sf2 = add(store, 10, 40);
SimpleFeature sf3 = add(store, 20, 30);
@Test(groups = "Functional")
public void testFindOverlaps_mixed()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 50);
SimpleFeature sf2 = add(store, 1, 15);
SimpleFeature sf3 = add(store, 20, 30);
@Test(groups = "Functional")
public void testRemove()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 20);
assertTrue(store.contains(sf1));
assertTrue(store.isEmpty());
}
- /**
- * A helper method to test whether a list contains a specific object (by
- * object identity, not equality test as used by List.contains())
- *
- * @param list
- * @param o
- * @return
- */
- private static boolean containsObject(List<? extends Object> list,
- Object o)
- {
- for (Object i : list)
- {
- if (i == o)
- {
- return true;
- }
- }
- return false;
- }
-
@Test(groups = "Functional")
public void testAdd()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
assertFalse(store.add(null));
@Test(groups = "Functional")
public void testAdd_noDuplicates()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = new SimpleFeature(10, 20, "Cath");
SimpleFeature sf2 = new SimpleFeature(10, 20, "Cath");
@Test(groups = "Functional")
public void testIsEmpty()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
assertTrue(store.isEmpty());
assertEquals(store.size(), 0);
/*
* add a feature and a nested feature
*/
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 20);
// sf2 is nested in sf1 so will be stored in nestedFeatures
SimpleFeature sf2 = add(store, 12, 14);
@Test(groups = "Functional")
public void testContains()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = new SimpleFeature(10, 20, "Cath");
SimpleFeature sf2 = new SimpleFeature(10, 20, "Pfam");
@Test(groups = "Functional")
public void testFindOverlaps_resultsArg_mixed()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 50);
SimpleFeature sf2 = add(store, 1, 15);
SimpleFeature sf3 = add(store, 20, 30);
@Test(groups = "Functional")
public void testFindOverlaps_resultsArg_nested()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 50);
SimpleFeature sf2 = add(store, 10, 40);
SimpleFeature sf3 = add(store, 20, 30);
@Test(groups = "Functional")
public void testFindOverlaps_resultsArg_nonNested()
{
- IntervalStore0<SimpleFeature> store = new IntervalStore0Impl();
+ IntervalStore0<SimpleFeature> store = new IntervalStore0<>();
SimpleFeature sf1 = add(store, 10, 20);
// same range different description
SimpleFeature sf2 = new SimpleFeature(10, 20, "desc");
+ start + " " + end);
StringBuffer sb = new StringBuffer();
IntervalStoreI<SimpleFeature> store;
- store = new intervalstore.nonc.IntervalStore0Impl();
+ store = new IntervalStore0<>();
testAddAndQueryTiming(store, false, sb, addstart, addend, start, end);
store = new intervalstore.impl.IntervalStore<>();
}
if (!isNCList)
{
- ((intervalstore.nonc.IntervalStore0) store).revalidate();
+ ((intervalstore.nonc.IntervalStore0<SimpleFeature>) store)
+ .revalidate();
}
String line = "time to load " + (isNCList ? "NClist " : "NCArray ")
+ (System.nanoTime() - ntimeLoad) / K / K + " ms scale "