1 22 23 package org.objectweb.petals.tools.jbicommon.descriptor; 24 25 import java.net.URI ; 26 27 import org.apache.commons.lang.builder.EqualsBuilder; 28 import org.apache.commons.lang.builder.HashCodeBuilder; 29 import org.apache.commons.lang.builder.ToStringBuilder; 30 31 36 public class PetalsExtension { 37 38 private URI extensionURI; 39 40 private Object extensionObject; 41 42 public PetalsExtension() { super(); 44 } 45 46 @Override 47 public boolean equals(final Object other) { 48 if (!(other instanceof PetalsExtension)) { 49 return false; } 51 PetalsExtension castOther = (PetalsExtension) other; 52 return new EqualsBuilder().append(extensionURI, castOther.extensionURI) 53 .append(extensionObject, castOther.extensionObject).isEquals(); 54 } 55 56 public Object getExtensionObject() { 57 return extensionObject; 58 } 59 60 public URI getExtensionURI() { 61 return extensionURI; 62 } 63 64 @Override 65 public int hashCode() { 66 return new HashCodeBuilder().append(extensionURI).append( 67 extensionObject).toHashCode(); 68 } 69 70 public void setExtensionObject(final Object extensionObject) { 71 this.extensionObject = extensionObject; 72 } 73 74 public void setExtensionURI(final URI extensionURI) { 75 this.extensionURI = extensionURI; 76 } 77 78 @Override 79 public String toString() { 80 return new ToStringBuilder(this).append("extensionURI", extensionURI) 81 .append("extensionObject", extensionObject).toString(); 82 } 83 84 } 85 | Popular Tags |