/**
*
*/
package com.hp.jena.rules.functions.jena2;
import java.util.List;
import com.hp.jena.graph.Node;
import com.hp.jena.rules.functions.ApplyableBase;
import com.hp.jena.rules.retelike.impl.Bindings;
import com.hp.jena.rules.retelike.impl.ExecContext;
public class ListContains extends ApplyableBase
{
protected final Node list, element;
public ListContains( List<Node> nargs )
{ list = nargs.get( 0 ); element = nargs.get( 1 ); }
@Override public boolean evalBool( ExecContext c, Bindings<Node, Node> item )
{
Node lv = eval( item, list ), ev = eval( item, element );
return c.listContains( lv, ev );
}
}