1 22 23 package org.objectweb.petals.tools.jbicommon.descriptor; 24 25 import org.apache.commons.lang.builder.EqualsBuilder; 26 import org.apache.commons.lang.builder.HashCodeBuilder; 27 import org.apache.commons.lang.builder.ToStringBuilder; 28 29 38 public class SharedLibraryList { 39 40 43 private String name; 44 45 48 private String version; 49 50 53 SharedLibraryList() { 54 super(); 55 } 56 57 @Override 58 public boolean equals(final Object other) { 59 if (!(other instanceof SharedLibraryList)) { 60 return false; } 62 SharedLibraryList castOther = (SharedLibraryList) other; 63 return new EqualsBuilder().append(name, castOther.name).append(version, 64 castOther.version).isEquals(); 65 } 66 67 72 public String getName() { 73 return name; 74 } 75 76 82 public String getVersion() { 83 return version; 84 } 85 86 90 @Override 91 public int hashCode() { 92 return new HashCodeBuilder().append(name).append(version).toHashCode(); 93 } 94 95 @Override 96 public String toString() { 97 return new ToStringBuilder(this).append("name", name).append("version", 98 version).toString(); 99 } 100 101 107 void setName(final String name) { 108 this.name = name; 109 } 110 111 117 void setVersion(final String version) { 118 this.version = version; 119 } 120 121 } 122 | Popular Tags |