net.sf.basedb.util.extensions.manager
Class ExtensionKey
java.lang.Object
net.sf.basedb.util.extensions.manager.ExtensionKey
- All Implemented Interfaces:
- ObjectKey<Extension>
public class ExtensionKey
- extends Object
- implements ObjectKey<Extension>
Key implementation used to identify extensions.
Since each extension is identified by it's id,
we use that as the key for equality.
- Since:
- 3.0
- Author:
- Nicklas
- See Also:
Extension
- Last modified
- $Date: 2011-04-14 09:45:23 +0200 (Thu, 14 Apr 2011) $
id
private final String id
ExtensionKey
public ExtensionKey(String id)
- Create a new key for an extension with the given id.
- Parameters:
id
- The id (required)
ExtensionKey
public ExtensionKey(Extension ext)
- Create a new key for an extension.
- Parameters:
ext
- The extension point (required)
toDescription
public String toDescription()
- Description copied from interface:
ObjectKey
- Get a string description of the key that is suitable for use
in (error) messages to users.
- Specified by:
toDescription
in interface ObjectKey<Extension>
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object