public static class Translate extends ROperator {
Translate(){super("translate"); }
public void execute(DTState state) throws RulesException {
boolean duplicates = state.datapop().booleanValue();
RArray keys = state.datapop().rArrayValue();
RTable table = state.datapop().rTableValue();
RArray valueArray = new RArray(state.getSession().getUniqueID(),duplicates,false);
for(IRObject key : keys){
if(table.containsKey(key)){
valueArray.add(table.getValue(key));
}
}
state.datapush(valueArray);
}