1 package net.sf.saxon.expr; 2 3 import net.sf.saxon.om.NamePool; 4 import net.sf.saxon.om.Item; 5 import net.sf.saxon.om.SequenceIterator; 6 import net.sf.saxon.trans.XPathException; 7 import net.sf.saxon.value.Value; 8 9 15 16 public class LazyExpression extends UnaryExpression { 17 18 private LazyExpression(Expression operand) { 19 super(operand); 20 } 21 22 public static Expression makeLazyExpression(Expression operand) { 23 if (operand instanceof LazyExpression || operand instanceof Value) { 24 return operand; 25 } else { 26 return new LazyExpression(operand); 27 } 28 } 29 30 45 46 public Item evaluateItem(XPathContext context) throws XPathException { 47 return operand.evaluateItem(context); 48 } 49 50 64 65 public SequenceIterator iterate(XPathContext context) throws XPathException { 66 return operand.iterate(context); 67 } 68 69 75 76 public void process(XPathContext context) throws XPathException { 77 operand.process(context); 78 } 79 80 protected String displayOperator(NamePool pool) { 81 return "lazy"; 82 } 83 84 85 } 86 87 88 89 107 | Popular Tags |