|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemonster.surinam.export.service.VersionedProviderImplementationName
public class VersionedProviderImplementationName
This class is designed to be used as a compound hash map key for service implementations that are
versioned in meta-data only. It is constructed, such that, another
thread can independently create a key on its own and present it to the map for retrieval. To this
end, we implement the equals, hashmap methods. Note that we also will allow equality in cases where
the objects are different but their versioned name is equal.
The semantics of this key is that the fully-qualified class name, along with the version string will
uniquely identify a service implementation.
| Constructor Summary | |
|---|---|
VersionedProviderImplementationName(String name,
String versionString)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Object obj)
Comparison simply consists of accounting for both the class name and the version. |
boolean |
equals(Object o)
|
String |
getName()
|
String |
getVersion()
|
String |
getVersionedName()
For internal comparisons, we want to be able to compare them in one shot, this will serve to make them sortable as well as map-retrievable. |
int |
hashCode()
This hash accounts for the name and the version. |
void |
setName(String name)
|
void |
setVersionString(String versionString)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VersionedProviderImplementationName(String name,
String versionString)
| Method Detail |
|---|
public void setName(String name)
public void setVersionString(String versionString)
public String getVersionedName()
public String getName()
public String getVersion()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparableobj - The object to be compared against, which we expect to be an instance of
VersionedProviderImplementationName.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||