com.trigonic.jrobotx
Class RecordIterator

java.lang.Object
  extended by com.trigonic.jrobotx.util.AbstractIterator<Record>
      extended by com.trigonic.jrobotx.RecordIterator
All Implemented Interfaces:
java.util.Iterator<Record>

public class RecordIterator
extends AbstractIterator<Record>

An Iterator over Record objects returned from a robots.txt source. After iteration, the record that first matched "*" may be retrieved using getDefaultRecord().


Constructor Summary
RecordIterator(java.io.BufferedReader reader)
           
RecordIterator(java.io.InputStream inputStream)
           
RecordIterator(java.io.Reader reader)
           
 
Method Summary
 Record getDefaultRecord()
          Retrieve the Record that first matched "*".
protected  Record getNext()
          Implement this to return the next value in the iteration, or null if none remain.
 java.util.Set<java.lang.String> getUnknownFields()
          Retrieve fields from the supplied robots.txt that are unknown and ignored.
 
Methods inherited from class com.trigonic.jrobotx.util.AbstractIterator
hasNext, next, remove, removeLast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordIterator

public RecordIterator(java.io.BufferedReader reader)

RecordIterator

public RecordIterator(java.io.Reader reader)

RecordIterator

public RecordIterator(java.io.InputStream inputStream)
Method Detail

getDefaultRecord

public Record getDefaultRecord()
Retrieve the Record that first matched "*". This may not be available until the end of the iteration.


getUnknownFields

public java.util.Set<java.lang.String> getUnknownFields()
Retrieve fields from the supplied robots.txt that are unknown and ignored. (Fields that are known but ignored, like "Sitemap", are not included in this list.)


getNext

protected Record getNext()
Description copied from class: AbstractIterator
Implement this to return the next value in the iteration, or null if none remain.

Specified by:
getNext in class AbstractIterator<Record>