assertEquals( 0,
map.size() );
final Cheese stilton1 = new Cheese( "stilton",
35 );
final InternalFactHandle stiltonHandle1 = new DefaultFactHandle( 1,
stilton1 );
map.add( new RightTuple( stiltonHandle1,
null ) );
final Cheese cheddar1 = new Cheese( "cheddar",
35 );
final InternalFactHandle cheddarHandle1 = new DefaultFactHandle( 2,
cheddar1 );
map.add( new RightTuple( cheddarHandle1,
null ) );
assertEquals( 2,
map.size() );
assertEquals( 2,
tablePopulationSize( map ) );
final Cheese stilton2 = new Cheese( "stilton",
77 );
final InternalFactHandle stiltonHandle2 = new DefaultFactHandle( 2,
stilton2 );
RightTupleList list = map.get( new LeftTupleImpl( stiltonHandle2,
null,
true ),stiltonHandle2 );
assertSame( stiltonHandle1,
list.first.getFactHandle() );
assertNull( list.first.getNext() );
final Cheese cheddar2 = new Cheese( "cheddar",
5 );
final InternalFactHandle cheddarHandle2 = new DefaultFactHandle( 2,
cheddar2 );
list = map.get( new LeftTupleImpl( cheddarHandle2,
null,
true ), cheddarHandle2 );
assertSame( cheddarHandle1,