public TupleListFilter(Tuple[] list){
tlist = list;
}
public boolean select(ArtifactObsEvent ev){
Tuple sig = ev.getSignal();
if (sig != null){
for (Tuple tuple: tlist){
if (tuple.getLabel().equals(sig.getLabel()) && tuple.getNArgs() == sig.getNArgs()){
boolean match = false;
for (int i = 0; i < tuple.getNArgs(); i++){
Object arg = tuple.getContent(i);
if (arg!=null && !arg.equals(sig.getContent(i))){
match = false;
break;
}
}
if (match){