|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.xbean.kernel.StringServiceName
A simple service name containing a single String.
| Constructor Summary | |
StringServiceName(java.lang.String name)
Create a StringServiceName wrapping specified name. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
A service name must property implement equals. |
int |
hashCode()
A service name must properly implement hashCode. |
java.lang.String |
toString()
A service name should return a string from toString that can be used in a String constructor. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StringServiceName(java.lang.String name)
name - the name of the service| Method Detail |
public int hashCode()
ServiceName
public int hashCode() {
int result = 17;
result = 37 * result + integer;
result = 37 * result + (object == null ? 0 : object.hashCode());
return result;
}
hashCode in interface ServiceNamepublic boolean equals(java.lang.Object obj)
ServiceName
public boolean equals(Object obj) {
if (!(obj instanceof MyServiceName)) {
return false;
}
MyServiceName name = (MyServiceName) obj;
return integer == name.integer &&
(object == null ? name.object == null : object.equals(name.object));
}
equals in interface ServiceNamepublic java.lang.String toString()
ServiceName
toString in interface ServiceName
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||