1 57 58 package org.apache.commons.jrcs.diff; 59 60 import java.util.List ; 61 62 71 public class DeleteDelta 72 extends Delta 73 { 74 75 DeleteDelta() 76 { 77 super(); 78 } 79 80 public DeleteDelta(Chunk orig) 81 { 82 init(orig, null); 83 } 84 85 public void verify(List target) 86 throws PatchFailedException 87 { 88 if (!original.verify(target)) 89 { 90 throw new PatchFailedException(); 91 } 92 } 93 94 public void applyTo(List target) 95 { 96 original.applyDelete(target); 97 } 98 99 public void toString(StringBuffer s) 100 { 101 s.append(original.rangeString()); 102 s.append("d"); 103 s.append(revised.rcsto()); 104 s.append(Diff.NL); 105 original.toString(s, "< ", Diff.NL); 106 } 107 108 111 public void toRCSString(StringBuffer s, String EOL) 112 { 113 s.append("d"); 114 s.append(original.rcsfrom()); 115 s.append(" "); 116 s.append(original.size()); 117 s.append(EOL); 118 } 119 120 public void accept(RevisionVisitor visitor) 121 { 122 visitor.visit(this); 123 } 124 } | Popular Tags |