Concept extends PartiallyOrdered<Concept> { @Override public Concept intersect(final Concept that) { return new Concept(new MutableBitSet(), this.and(that)); } Concept(final MutableBitSet extent, final MutableBitSet intent); MutableBitSet extent(); MutableBitSet intent(); @Override boolean apply(final Concept that); @Override boolean isLessThan(final Concept that); @Override boolean isLessOrEqualTo(final Concept that); @Override boolean isGreaterThan(final Concept that); @Override boolean isGreaterOrEqualTo(final Concept that); @Override boolean equals(final Object that); @Override int hashCode(); @Override String toString(); @Override Concept intersect(final Concept that); @Override Concept union(final Concept that); @Override double measure();  }
@Test public void testIntersect() { Concept intersect = S.intersect(T); assertEquals(intersect.extent(), bits()); assertEquals(intersect.intent(), bits(0, 1, 3)); intersect = T.intersect(S); assertEquals(intersect.intent(), bits(0, 1, 3)); intersect = W.intersect(W); assertEquals(intersect.intent(), W.intent()); intersect = W.intersect(X); assertEquals(intersect.intent(), bits()); intersect = X.intersect(S); assertEquals(intersect.intent(), X.intent()); }