1 18 package org.apache.tools.ant.taskdefs.cvslib; 19 20 import java.util.Date ; 21 import java.util.Vector ; 22 23 27 public class CVSEntry { 28 private Date date; 29 private String author; 30 private final String comment; 31 private final Vector files = new Vector (); 32 33 39 public CVSEntry(final Date date, final String author, final String comment) { 40 this.date = date; 41 this.author = author; 42 this.comment = comment; 43 } 44 45 50 public void addFile(final String file, final String revision) { 51 files.addElement(new RCSFile(file, revision)); 52 } 53 54 60 public void addFile(final String file, final String revision, final String previousRevision) { 61 files.addElement(new RCSFile(file, revision, previousRevision)); 62 } 63 64 68 public Date getDate() { 69 return date; 70 } 71 72 76 public void setAuthor(final String author) { 77 this.author = author; 78 } 79 80 84 public String getAuthor() { 85 return author; 86 } 87 88 92 public String getComment() { 93 return comment; 94 } 95 96 100 public Vector getFiles() { 101 return files; 102 } 103 104 108 public String toString() { 109 return getAuthor() + "\n" + getDate() + "\n" + getFiles() + "\n" 110 + getComment(); 111 } 112 } 113 | Popular Tags |