FileDocCategorySizeDatePackage
CvsTagEntry.javaAPI DocApache Ant 1.703326Wed Dec 13 06:16:18 GMT 2006org.apache.tools.ant.taskdefs.cvslib

CvsTagEntry

public class CvsTagEntry extends Object
Holds the information of a line of rdiff

Fields Summary
private String
filename
the filename
private String
prevRevision
the previous revision
private String
revision
the revision
Constructors Summary
public CvsTagEntry(String filename)
Creates a new CvsTagEntry

param
filename the filename to add

        this(filename, null, null);
    
public CvsTagEntry(String filename, String revision)
Creates a new CvsTagEntry

param
filename the filename to add
param
revision the revision

        this(filename, revision, null);
    
public CvsTagEntry(String filename, String revision, String prevRevision)
Creates a new CvsTagEntry

param
filename the filename to add
param
revision the revision
param
prevRevision the previous revision

        this.filename = filename;
        this.revision = revision;
        this.prevRevision = prevRevision;
    
Methods Summary
public java.lang.StringgetFile()
Gets the filename for this CvsTagEntry

return
the filename

        return filename;
    
public java.lang.StringgetPreviousRevision()
Gets the previous revision for this CvsTagEntry

return
the previous revision

        return prevRevision;
    
public java.lang.StringgetRevision()
Gets the revision for this CvsTagEntry

return
the revision

        return revision;
    
public java.lang.StringtoString()
Gets a String containing filename and difference from previous version

return
a string representation of this CVSTagEntry

        StringBuffer buffer = new StringBuffer();
        buffer.append(filename);
        if ((revision == null)) {
            buffer.append(" was removed");
            if (prevRevision != null) {
                buffer.append("; previous revision was ").append(prevRevision);
            }
        } else if (revision != null && prevRevision == null) {
            buffer.append(" is new; current revision is ")
                .append(revision);
        } else if (revision != null && prevRevision != null) {
            buffer.append(" has changed from ")
                .append(prevRevision).append(" to ").append(revision);
        }
        return buffer.toString();