|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xbean.kernel.StringServiceName
public class StringServiceName
A simple service name containing a single String.
| Constructor Summary | |
|---|---|
StringServiceName(String name)
Create a StringServiceName wrapping specified name. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
A service name must property implement equals. |
int |
hashCode()
A service name must properly implement hashCode. |
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(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 ServiceNamehashCode in class Objectpublic boolean equals(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 ServiceNameequals in class Objectobj - some object
public String toString()
ServiceName
toString in interface ServiceNametoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||