super("removeat");
}
public void execute(DTState state) throws RulesException {
int position = state.datapop().intValue();
RArray rarray = (RArray) state.datapop();
if (position >= rarray.size()) {
state.datapush(RBoolean.getRBoolean(false));
}
List<IRObject> array = rarray.arrayValue();
if (state.testState(DTState.TRACE)) {
state.traceInfo("removed", "arrayId", rarray.getID() + "",
"position", position + "", null);
}
array.remove(position);
if (state.testState(DTState.TRACE)) {
state.traceInfo("removedat", "arrayId",
rarray.getID() + "", position+"");
}
state.datapush(RBoolean.getRBoolean(true));
}