1 23 24 package org.enhydra.xml.xmlc.perf; 25 26 import org.w3c.dom.Document ; 27 28 32 public class NoOpEditor implements DOMEditor { 33 34 private boolean firstTime = true; 35 36 41 public int edit(Document doc) throws Exception { 42 firstTime = false; 43 return 0; 44 } 45 46 public String toString() { 47 return "NoOpEditor: performs NO operations on the DOM tree."; 48 } 49 50 57 public synchronized boolean next() { 58 if (firstTime) { 59 firstTime = false; 60 return true; 61 } 62 return false; 63 } 64 65 68 public synchronized void reset() { 69 firstTime = true; 70 } 71 72 } 73 74 75 76 77 78 79 | Popular Tags |