public interface ServiceFactory
ServiceFactory
creates Service
instances.Modifier and Type | Method and Description |
---|---|
Service |
create()
Creates a service object.
|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is equal to this
factory.
|
Service create()
boolean equals(@Nullable java.lang.Object o)
Object.equals(Object)
. Additionally, this method
can return true
only if the specified object
is also a factory and it creates instances the same way as
this factory.
Note: that it is always safe not to override
Object.equals(Object)
. However, overriding this method may,
in some cases, improve performance by allowing programs to determine
that two distinct factories work the same way.
equals
in class java.lang.Object
o
- the reference object with which to comparetrue
only if the specified object is also a factory
and it creates instances the same way as this factory