Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.util
Class PeekingIteratorImpl

    java.lang.Object
      org.htmlparser.util.PeekingIteratorImpl

All Implemented Interfaces:
  NodeIterator, PeekingIterator

Deprecated. shouldn't need to pre-read tags.

public class PeekingIteratorImpl
extends Object
implements PeekingIterator

Constructor Summary
`PeekingIteratorImpl(Lexer lexer, ParserFeedback fb)` Deprecated.

Method Summary
`boolean` | `hasMoreNodes()` Deprecated. Check if more nodes are available.
`Node` | `nextNode()` Deprecated. Get the next node.
`Node` | `peek()` Deprecated. Fetch a node without consuming it.
`void` | `push(Node node)` Deprecated. Makes `node` the next `Node` that will be returned.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PeekingIteratorImpl

    public PeekingIteratorImpl(Lexer lexer,
                               ParserFeedback fb)

  Deprecated.

Method Detail

### peek

    public Node peek()
              throws ParserException

  Deprecated.
  Description copied from interface: `PeekingIterator`
  Fetch a node without consuming it. Subsequent calls to `peek()` will return subsequent nodes. The node returned by `peek()` will never be a node already consumed by `nextHTMLNode()`.

  For example, say there are nodes <H1><H2><H3><H4><H5>, this is the nodes that would be returned for the indicated calls:

       peek()         H1
       peek()         H2
       nextHTMLNode() H1
       peek()         H3
       nextHTMLNode() H2
       nextHTMLNode() H3
       nextHTMLNode() H4
       peek()         H5

  Specified by:
    `peek` in interface `PeekingIterator`
  Returns:
    The next node that would be returned by `nextHTMLNode()` or the node after the last node returned by `peek()`, whichever is later in the stream. or null if there are no more nodes available via the above rules.
  Throws:
    `ParserException`

### push

    public void push(Node node)

  Deprecated.
  Makes `node` the next `Node` that will be returned.

  Parameters:
    `node` - The node to return next.

### hasMoreNodes

    public boolean hasMoreNodes()
                         throws ParserException

  Deprecated.
  Check if more nodes are available.

  Specified by:
    `hasMoreNodes` in interface `NodeIterator`
  Returns:
    `true` if a call to `nextNode()` will succeed.
  Throws:
    `ParserException`

### nextNode

    public Node nextNode()
                  throws ParserException

  Deprecated.
  Get the next node.

  Specified by:
    `nextNode` in interface `NodeIterator`
  Returns:
    The next node in the HTML stream, or null if there are no more nodes.
  Throws:
    `ParserException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.