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 37 public class Identification extends ExtensibleJbiElement { 38 39 42 private String name; 43 44 47 private String description; 48 49 52 public Identification() { super(); 54 } 55 56 @Override 57 public boolean equals(final Object other) { 58 if (!(other instanceof Identification)) { 59 return false; } 61 Identification castOther = (Identification) other; 62 return new EqualsBuilder().append(name, castOther.name).append( 63 description, castOther.description).isEquals(); 64 } 65 66 71 public String getDescription() { 72 return description; 73 } 74 75 80 public String getName() { 81 return name; 82 } 83 84 88 @Override 89 public int hashCode() { 90 return new HashCodeBuilder().append(name).append(description) 91 .toHashCode(); 92 } 93 94 @Override 95 public String toString() { 96 return new ToStringBuilder(this).append("name", name).append( 97 "description", description).toString(); 98 } 99 100 106 protected void setDescription(final String description) { 107 this.description = description; 108 } 109 110 116 protected void setName(final String name) { 117 this.name = name; 118 } 119 120 } 121 | Popular Tags |