org.fcrepo.client.utility.validate.process
Class PidfileIterator

java.lang.Object
  extended by org.fcrepo.client.utility.validate.process.PidfileIterator
All Implemented Interfaces:
Iterator<String>

public class PidfileIterator
extends Object
implements Iterator<String>

Iterates through a File of PIDs. Each PID appears on its own line. Blank lines are ignored. White space at beginning and end of a PID is trimmed. Lines whose first non-blank character is an octothorpe ('#') are comments, and are ignored also.

Note that checked exceptions are not permitted on Iterator.next() or Iterator.hasNext() methods, so if we get an IOException on one of these methods, we'll wrap it in an IllegalStateException.

Author:
Jim Blake

Constructor Summary
PidfileIterator(File pidfile)
           
 
Method Summary
 boolean hasNext()
          
 String next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PidfileIterator

public PidfileIterator(File pidfile)
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<String>

next

public String next()

Specified by:
next in interface Iterator<String>

remove

public void remove()

Specified by:
remove in interface Iterator<String>


Copyright © 2012 DuraSpace. All Rights Reserved.