1 package net.sf.saxon.om; 2 3 import net.sf.saxon.expr.LastPositionFinder; 4 import net.sf.saxon.expr.ReversibleIterator; 5 import net.sf.saxon.value.EmptySequence; 6 import net.sf.saxon.value.Value; 7 8 13 14 public class EmptyIterator implements AxisIterator, 15 ReversibleIterator, LastPositionFinder, GroundedIterator, LookaheadIterator { 16 17 private static EmptyIterator theInstance = new EmptyIterator(); 18 19 24 public static EmptyIterator getInstance() { 25 return theInstance; 26 } 27 28 32 public Item next() { 33 return null; 34 } 35 36 40 public Item current() { 41 return null; 42 } 43 44 49 public int position() { 50 return 0; 51 } 52 53 58 public int getLastPosition() { 59 return 0; 60 } 61 62 67 public SequenceIterator getAnother() { 68 return theInstance; 69 } 70 71 80 81 83 88 public SequenceIterator getReverseIterator() { 89 return theInstance; 90 } 91 92 101 102 public int getProperties() { 103 return GROUNDED | LAST_POSITION_FINDER | LOOKAHEAD; 104 } 105 106 112 113 public Value materialize() { 114 return EmptySequence.getInstance(); 115 } 116 117 125 126 public boolean hasNext() { 127 return false; 128 } 129 130 } 131 132 | Popular Tags |