}
public BetaMemory createBetaMemory(RuleBaseConfiguration config) {
BetaMemory memory;
if ( this.indexed >= 0 ) {
LinkedListEntry entry = (LinkedListEntry) this.constraints.getFirst();
final List list = new ArrayList();
for ( int pos = 0; pos <= this.indexed; pos++ ) {
final Constraint constraint = (Constraint) entry.getObject();
final VariableConstraint variableConstraint = (VariableConstraint) constraint;
final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
variableConstraint.getRequiredDeclarations()[0],
variableConstraint.getEvaluator() );
list.add( index );
entry = (LinkedListEntry) entry.getNext();
}
final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
LeftTupleMemory tupleMemory;
if ( config.isIndexLeftBetaMemory() ) {