com.bigdata.relation.rule
Class IN<T>

java.lang.Object
  extended by com.bigdata.relation.rule.IN<T>
All Implemented Interfaces:
IConstraint, Serializable

public class IN<T>
extends Object
implements IConstraint

A constraint that a variable may only take on the bindings enumerated by some set.

Version:
$Id: IN.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form
TODO:
This uses binary search, which is thread-safe. It could aslo use a HashSet, but the HashSet needs to be thread-safe since the filter could be applied concurrently during evaluation.

Constructor Summary
IN(IVariable<T> x, IConstant<T>[] set)
           
 
Method Summary
 boolean accept(IBindingSet bindingSet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IN

public IN(IVariable<T> x,
          IConstant<T>[] set)
Parameters:
x - Some variable.
set - A set of legal term identifiers providing a constraint on the allowable values for that variable.
Method Detail

accept

public boolean accept(IBindingSet bindingSet)
Specified by:
accept in interface IConstraint


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.