class StandardMicroInstruction implements MicroInstruction
{
- private final Runnable updateCallback;
private MicroInstructionParameter[] parameters;
- StandardMicroInstruction(Runnable updateCallback, MicroInstructionParameter... parameters)
+ StandardMicroInstruction(MicroInstructionParameter... parameters)
{
- this.updateCallback = updateCallback;
- this.parameters = parameters;
+ this.parameters = parameters.clone();
}
/**
return parameters.length;
}
- /**
- * @throws IndexOutOfBoundsException
- */
@Override
- public void setParameter(int index, MicroInstructionParameter param)
+ public MicroInstructionParameter[] getParameters()
{
- parameters[index] = param;
- updateCallback.run();
+ return parameters.clone();
}
}