1 10 package com.hp.hpl.jena.reasoner.rulesys.impl; 11 12 import com.hp.hpl.jena.graph.Node; 13 14 import java.util.*; 15 16 27 public class ChoicePointFrame extends GenericChoiceFrame { 28 29 30 Node[] argVars = new Node[RuleClauseCode.MAX_ARGUMENT_VARS]; 31 32 33 Iterator clauseIterator; 34 35 42 public ChoicePointFrame(LPInterpreter interpreter, List predicateClauses) { 43 init(interpreter, predicateClauses); 44 } 45 46 52 public void init(LPInterpreter interpreter, List predicateClauses) { 53 super.init(interpreter); 54 System.arraycopy(interpreter.argVars, 0, argVars, 0, argVars.length); 55 clauseIterator = predicateClauses.iterator(); 56 } 57 58 61 public boolean hasNext() { 62 return clauseIterator.hasNext(); 63 } 64 65 68 public RuleClauseCode nextClause() { 69 return (RuleClauseCode) clauseIterator.next(); 70 } 71 72 } 73 74 | Popular Tags |