bibliothek.gui.dock.util.extension
Class ExtensionName<E>

java.lang.Object
  extended by bibliothek.gui.dock.util.extension.ExtensionName<E>
Type Parameters:
E - the type of this extension

public class ExtensionName<E>
extends Object

The name of some extension that can be loaded through Extension.

Author:
Benjamin Sigg

Constructor Summary
ExtensionName(Path name, Class<E> type, Map<String,Object> parameters)
          Creates a new name.
ExtensionName(Path name, Class<E> type, String parameterKey, Object parameterValue)
          Creates a new name.
 
Method Summary
 boolean equals(Object obj)
           
 Object get(String parameter)
          Gets an additional parameter of this extension.
 Path getName()
          Gets the unique name of this extension.
 Class<E> getType()
          Gets the type of this extension.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtensionName

public ExtensionName(Path name,
                     Class<E> type,
                     Map<String,Object> parameters)
Creates a new name.

Parameters:
name - the unique identifier of this extension
type - the type of this extension
parameters - all the parameters for this extension, can be null

ExtensionName

public ExtensionName(Path name,
                     Class<E> type,
                     String parameterKey,
                     Object parameterValue)
Creates a new name.

Parameters:
name - the unique identifier of this extension
type - the type of this extension
parameterKey - the key of the only parameter of this ExtensionName
parameterValue - the value of the only parameter of this ExtensionName
Method Detail

getName

public Path getName()
Gets the unique name of this extension.

Returns:
the name, not null

getType

public Class<E> getType()
Gets the type of this extension.

Returns:
the type, not null

get

public Object get(String parameter)
Gets an additional parameter of this extension. The name, type and meaning of the parameter depends on the extensions name.

Parameters:
parameter - the name of the parameter
Returns:
the value, can be null

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object