/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link net.sf.saxon.om.SequenceIterator#GROUNDED}, {@link net.sf.saxon.om.SequenceIterator#LAST_POSITION_FINDER}, * and {@link net.sf.saxon.om.SequenceIterator#LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return base.getProperties() & (SequenceIterator.LAST_POSITION_FINDER | SequenceIterator.LOOKAHEAD); }
/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link net.sf.saxon.om.SequenceIterator#GROUNDED}, {@link net.sf.saxon.om.SequenceIterator#LAST_POSITION_FINDER}, * and {@link net.sf.saxon.om.SequenceIterator#LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return base.getProperties() & (SequenceIterator.LAST_POSITION_FINDER | SequenceIterator.LOOKAHEAD); }
/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link SequenceIterator#GROUNDED}, {@link SequenceIterator#LAST_POSITION_FINDER}, * and {@link SequenceIterator#LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return base.getProperties() & LAST_POSITION_FINDER; } }
/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link #GROUNDED}, {@link #LAST_POSITION_FINDER}, * and {@link #LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. * @since 8.6 */ public int getProperties() { return base.getProperties(); }
@Override public int getProperties() { return iter.getProperties(); }
/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link #GROUNDED}, {@link #LAST_POSITION_FINDER}, * and {@link #LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return base.getProperties() & (LAST_POSITION_FINDER | LOOKAHEAD); } }
/** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link SequenceIterator#GROUNDED}, {@link SequenceIterator#LAST_POSITION_FINDER}, * and {@link SequenceIterator#LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return base.getProperties() & LAST_POSITION_FINDER; } }
public static LookaheadIterator makeLookaheadIterator(/*@NotNull*/ SequenceIterator base) throws XPathException { if ((base.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { return (LookaheadIterator) base; } else { return new LookaheadIteratorImpl(base); } }
public static LookaheadIterator makeLookaheadIterator(/*@NotNull*/ SequenceIterator base) throws XPathException { if ((base.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { return (LookaheadIterator) base; } else { return new LookaheadIteratorImpl(base); } }
public static Sequence<?> toLazySequence2(SequenceIterator<?> iterator) throws XPathException { if ((iterator.getProperties() & SequenceIterator.GROUNDED) != 0 && !(iterator instanceof RangeIterator) && !(iterator instanceof ReverseRangeIterator)) { return iterator.materialize(); } else { return new LazySequence<>(iterator); } }
public static Sequence<?> toLazySequence2(SequenceIterator<?> iterator) throws XPathException { if ((iterator.getProperties() & SequenceIterator.GROUNDED) != 0 && !(iterator instanceof RangeIterator) && !(iterator instanceof ReverseRangeIterator)) { return iterator.materialize(); } else { return new LazySequence<>(iterator); } }
private static boolean empty(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = !((LookaheadIterator) iter).hasNext(); } else { result = iter.next() == null; } iter.close(); return result; }
private static boolean exists(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = ((LookaheadIterator) iter).hasNext(); } else { result = iter.next() != null; } iter.close(); return result; }
/** * Determine whether the context position is the same as the context size * that is, whether position()=last() */ public final boolean isAtLast() throws XPathException { if ((currentIterator.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { return !((LookaheadIterator)currentIterator).hasNext(); } return getContextPosition() == getLast(); }
private static boolean empty(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = !((LookaheadIterator) iter).hasNext(); } else { result = iter.next() == null; } iter.close(); return result; }
/** * Determine whether the context position is the same as the context size * that is, whether position()=last() */ public final boolean isAtLast() throws XPathException { if ((currentIterator.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { return !((LookaheadIterator)currentIterator).hasNext(); } return getContextPosition() == getLast(); }
private static boolean exists(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = ((LookaheadIterator) iter).hasNext(); } else { result = iter.next() != null; } iter.close(); return result; }
/** * Determine whether the context position is the same as the context size * that is, whether position()=last() */ public final boolean isAtLast() throws XPathException { if ((currentIterator.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { return !((LookaheadIterator)currentIterator).hasNext(); } return getContextPosition() == getLast(); }
public SequenceIterator iterate(XPathContext context) throws XPathException { SequenceIterator baseIter = base.iterate(context); if ((baseIter.getProperties() & SequenceIterator.GROUNDED) != 0) { return new ValueTailIterator(((GroundedIterator)baseIter).materialize(), start - 1); } else { return TailIterator.make(baseIter, start); } }
public SequenceIterator iterate(XPathContext context) throws XPathException { SequenceIterator baseIter = base.iterate(context); if ((baseIter.getProperties() & SequenceIterator.GROUNDED) != 0) { return new ValueTailIterator(((GroundedIterator)baseIter).materialize(), start - 1); } else { return TailIterator.make(baseIter, start); } }