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 34 public class ExtensibleJbiElement { 35 36 private Extensions extensions; 37 38 public ExtensibleJbiElement() { super(); 40 } 41 42 @Override 43 public boolean equals(final Object other) { 44 if (!(other instanceof ExtensibleJbiElement)) { 45 return false; } 47 ExtensibleJbiElement castOther = (ExtensibleJbiElement) other; 48 return new EqualsBuilder().append(extensions, castOther.extensions) 49 .isEquals(); 50 } 51 52 public Extensions getExtensions() { 53 return extensions; 54 } 55 56 @Override 57 public int hashCode() { 58 return new HashCodeBuilder().append(extensions).toHashCode(); 59 } 60 61 public void setExtensions(final Extensions extensions) { 62 this.extensions = extensions; 63 } 64 65 @Override 66 public String toString() { 67 return new ToStringBuilder(this).append("extensions", extensions) 68 .toString(); 69 } 70 71 } 72 | Popular Tags |