class DynamicRecordCheck implements RecordCheck<DynamicRecord, ConsistencyReport.DynamicConsistencyReport>,
        ComparativeRecordChecker<DynamicRecord, DynamicRecord, ConsistencyReport.DynamicConsistencyReport> {

    @Override
    public void check( DynamicRecord record,
                       CheckerEngine<DynamicRecord, ConsistencyReport.DynamicConsistencyReport> engine,
                       RecordAccess records )
    {
        if ( !record.inUse() )
        {
            return;
        }
        if ( record.getLength() == 0 )
        {
            engine.report().emptyBlock();
        }
        else if ( record.getLength() < 0 )
        {
            engine.report().invalidLength();
        }
        if ( !Record.NO_NEXT_BLOCK.is( record.getNextBlock() ) )
        {
            if ( record.getNextBlock() == record.getId() )
            {
                engine.report().selfReferentialNext();
            }
            else
            {
                engine.comparativeCheck( dereference.lookup( records, record.getNextBlock() ), this );
            }
            if ( record.getLength() < blockSize )
            {
                engine.report().recordNotFullReferencesNext();
            }
        }
    }

    public  DynamicRecordCheck( RecordStore<DynamicRecord> store, DynamicStore dereference );

}