ConceptLattice extends CompleteLattice<Concept> { @Override public final Concept join(final Concept left, final Concept right) { MutableBitSet bits = (MutableBitSet) new MutableBitSet().or(left.intent()).or(right.intent()); Concept query = new Concept(new MutableBitSet(), bits); return supremum(query, top).getProperty(LABEL); } ConceptLattice(final Graph graph, long numBits); Concept insert(final Concept concept); @Override final Concept join(final Concept left, final Concept right);  }
@Test public void testJoin() { Concept left = (Concept) lattice.join(lattice.bottom(), new Concept(bits(), bits(1, 3))); Concept right = (Concept) lattice.join(lattice.bottom(), new Concept(bits(), bits(0, 5))); assertEquals(left.intent(), bits(1, 3)); assertEquals(right.intent(), bits(0, 5)); assertEquals(((Concept) lattice.join(left, left)).intent(), bits(1, 3)); assertEquals(((Concept) lattice.join(left, right)).intent(), bits(0, 1, 3, 5)); }