KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > tools > jbicommon > descriptor > ExtensibleJbiElement


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005-2006 EBM WebSourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id$
20  * -------------------------------------------------------------------------
21  */

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 /**
30  *
31  * @author ofabre
32  *
33  */

34 public class ExtensibleJbiElement {
35
36     private Extensions extensions;
37
38     public ExtensibleJbiElement() { // NOPMD by gblondelle
39
super();
40     }
41
42     @Override JavaDoc
43     public boolean equals(final Object JavaDoc other) {
44         if (!(other instanceof ExtensibleJbiElement)) {
45             return false; // NOPMD by gblondelle
46
}
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 JavaDoc
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 JavaDoc
66     public String JavaDoc toString() {
67         return new ToStringBuilder(this).append("extensions", extensions)
68                 .toString();
69     }
70
71 }
72
Popular Tags