com.bigdata.rdf.spo
Class InGraphHashSetFilter

java.lang.Object
  extended by com.bigdata.rdf.spo.SPOFilter
      extended by com.bigdata.rdf.spo.InGraphHashSetFilter
All Implemented Interfaces:
IElementFilter<ISPO>, Serializable

public final class InGraphHashSetFilter
extends SPOFilter

"IN" filter for the context position based on a native long hash set containing the acceptable graph identifiers. While evaluation of the access path will be ordered, the filter does not maintain evolving state so a hash set will likely beat a binary search.

Version:
$Id: InGraphHashSetFilter.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
InGraphBinarySearchFilter, Serialized Form
TODO:
tighten serialization?

Constructor Summary
InGraphHashSetFilter(int initialCapacity, Iterable<? extends URI> graphs)
           
 
Method Summary
 boolean accept(ISPO spo)
          True iff the argument is matched by the filter.
 
Methods inherited from class com.bigdata.rdf.spo.SPOFilter
canAccept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InGraphHashSetFilter

public InGraphHashSetFilter(int initialCapacity,
                            Iterable<? extends URI> graphs)
Parameters:
graphs - The set of acceptable graph identifiers.
Method Detail

accept

public boolean accept(ISPO spo)
Description copied from interface: IElementFilter
True iff the argument is matched by the filter.

Parameters:
spo - An element.
Returns:
true iff the element is accepted by the filter.


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