IntervalLattice extends CompleteLattice<Interval<C>> { public Interval<C> insert(final Interval<C> interval) { return super.addIntent(interval, top).getProperty(LABEL); } IntervalLattice(final Graph graph); Interval<C> insert(final Interval<C> interval);  }
@Test public void testSetup() { IntervalLattice<Date> dates = new IntervalLattice<>(new TinkerGraph()); Date d1 = new Date(2015, 11, 15, 0, 0); Date d3 = new Date(2015, 12, 12, 0, 0); Date d4 = new Date(2015, 12, 10, 0, 0); Date d5 = new Date(2015, 12, 14, 0, 0); Date d6 = new Date(2015, 12, 11, 0, 0); Date d7 = new Date(2015, 12, 16, 0, 0); Date d8 = new Date(2015, 10, 1, 0, 0); Date d9 = new Date(2015, 10, 2, 0, 0); Interval<Date> a = new Interval<>(1, Range.closed(d1, d3)); Interval<Date> b = new Interval<>(1, Range.closed(d4, d5)); Interval<Date> c = new Interval<>(1, Range.closed(d6, d7)); Interval<Date> d = new Interval<>(1, Range.closed(d8, d9)); System.out.println("a.before(b) ? " + a.before(b)); System.out.println("d.before(b) ? " + d.before(b)); dates.insert(a); dates.insert(c); dates.insert(b); dates.insert(d); System.out.println(dates); }