1 22 package org.objectweb.petals.jbi.management.systemstate; 23 24 import org.objectweb.petals.util.StringHelper; 25 26 31 public class SharedLibraryState { 32 private String archiveURL; 33 34 private String installURL; 35 36 private String name; 37 38 public SharedLibraryState() { 39 super(); 40 } 41 42 public SharedLibraryState(String name, String installURL, String zipURL) { 43 super(); 44 this.name = name; 45 this.installURL = installURL; 46 this.archiveURL = zipURL; 47 } 48 49 public boolean equals(Object o) { 50 if (o instanceof SharedLibraryState) { 51 SharedLibraryState cc = (SharedLibraryState) o; 52 53 return StringHelper.equal(name, cc.name) 54 && StringHelper.equal(installURL, cc.installURL) 55 && StringHelper.equal(archiveURL, cc.archiveURL); 56 } else { 57 return false; 58 } 59 } 60 61 public String getArchiveURL() { 62 return archiveURL; 63 } 64 65 public String getInstallURL() { 66 return installURL; 67 } 68 69 public String getName() { 70 return name; 71 } 72 73 public int hashCode() { 74 int hashCode = 0; 75 if (archiveURL != null) { 76 hashCode += archiveURL.hashCode(); 77 } 78 if (installURL != null) { 79 hashCode += installURL.hashCode(); 80 } 81 if (name != null) { 82 hashCode += name.hashCode(); 83 } 84 return hashCode; 85 } 86 87 public void setArchiveURL(String zipURL) { 88 this.archiveURL = zipURL; 89 } 90 91 public void setInstallURL(String installURL) { 92 this.installURL = installURL; 93 } 94 95 public void setName(String name) { 96 this.name = name; 97 } 98 } 99 | Popular Tags |