1 6 7 package com.hp.hpl.jena.graph.query; 8 9 import java.util.*; 10 11 import com.hp.hpl.jena.util.CollectionFactory; 12 13 18 public class ExpressionSet 19 { 20 private Set expressions = CollectionFactory.createHashedSet(); 21 24 public ExpressionSet() 25 {} 26 27 32 public ExpressionSet add( Expression e ) 33 { 34 expressions.add( e ); 35 return this; 36 } 37 38 41 public boolean isComplex() 42 { return !expressions.isEmpty(); } 43 44 59 63 public ValuatorSet prepare( VariableIndexes vi ) 64 { 65 ValuatorSet result = new ValuatorSet(); 66 Iterator it = expressions.iterator(); 67 while (it.hasNext()) result.add( ((Expression) it.next()).prepare( vi ) ); 68 return result; 69 } 70 71 74 public Iterator iterator() 75 { return expressions.iterator(); } 76 77 80 public String toString() 81 { return expressions.toString(); } 82 } 83 84 | Popular Tags |