1 32 33 package com.jeantessier.diff; 34 35 import java.util.*; 36 37 import org.apache.log4j.*; 38 39 import com.jeantessier.classreader.*; 40 import com.jeantessier.dependency.*; 41 42 45 public class JarDifferences implements Differences { 46 private String name; 47 private String oldVersion; 48 private String newVersion; 49 50 private Collection packageDifferences = new LinkedList(); 51 52 55 JarDifferences(String name, String oldVersion, String newVersion) { 56 this.name = name; 57 this.oldVersion = oldVersion; 58 this.newVersion = newVersion; 59 } 60 61 public String getName() { 62 return name; 63 } 64 65 public String getOldVersion() { 66 return oldVersion; 67 } 68 69 public String getNewVersion() { 70 return newVersion; 71 } 72 73 public Collection getPackageDifferences() { 74 return packageDifferences; 75 } 76 77 public boolean isEmpty() { 78 return getPackageDifferences().size() == 0; 79 } 80 81 public void accept(Visitor visitor) { 82 visitor.visitJarDifferences(this); 83 } 84 85 public String toString() { 86 return getName(); 87 } 88 } 89 | Popular Tags |