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 java.lang.Object

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

Author:
Benjamin Sigg

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

Constructor Detail

ExtensionName

public ExtensionName(Path name,
                     java.lang.Class<E> type,
                     java.util.Map<java.lang.String,java.lang.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,
                     java.lang.Class<E> type,
                     java.lang.String parameterKey,
                     java.lang.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 java.lang.Class<E> getType()
Gets the type of this extension.

Returns:
the type, not null

get

public java.lang.Object get(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object