bibliothek.gui.dock.station.support
Class ConvertedPlaceholderListItem

java.lang.Object
  extended by bibliothek.gui.dock.station.support.ConvertedPlaceholderListItem

public class ConvertedPlaceholderListItem
extends Object

Data about a Dockable that was stored in a PlaceholderList.

Author:
Benjamin Sigg

Constructor Summary
ConvertedPlaceholderListItem()
           
 
Method Summary
 boolean contains(String key)
          Tells whether some data is stored for key.
 Object get(String key)
          Gets the data that is stored for key key.
 boolean getBoolean(String key)
          Gets the data that is stored for key key.
 double getDouble(String key)
          Gets the data that is stored for key key.
 int getInt(String key)
          Gets the data that is stored for key key.
 long getLong(String key)
          Gets the data that is stored for key key.
 Path getPlaceholder()
          Gets the placeholder that is associated with this item.
 PlaceholderMap getPlaceholderMap()
          Gets additional information about this item.
 String getString(String key)
          Gets the data that is stored for key key.
 String[] keys()
          Gets the keys of all the data that is stored.
 void put(String key, Object value)
          Stores an additional key-value pair.
 void putBoolean(String key, boolean value)
          Stores an additional key-value pair.
 void putInteger(String key, int value)
          Stores an additional key-value pair.
 void putLong(String key, long value)
          Stores an additional key-value pair.
 void putString(String key, String value)
          Stores an additional key-value pair.
 void putValue(String key, double value)
          Stores an additional key-value pair.
 void setPlaceholder(Path placeholder)
          Associates a placeholder with this item.
 void setPlaceholderMap(PlaceholderMap map)
          Associates a map of data with this item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertedPlaceholderListItem

public ConvertedPlaceholderListItem()
Method Detail

setPlaceholder

public void setPlaceholder(Path placeholder)
Associates a placeholder with this item. A PlaceholderList will insert this placeholder into its set of placeholders.

Parameters:
placeholder - the placeholder, can be null

getPlaceholder

public Path getPlaceholder()
Gets the placeholder that is associated with this item.

Returns:
the placeholder, can be null
See Also:
setPlaceholder(Path)

setPlaceholderMap

public void setPlaceholderMap(PlaceholderMap map)
Associates a map of data with this item. Notice that keys for this map must be valid placeholders. Clients may need to use the empty key (calling PlaceholderMap.newKey(Path...) with no arguments).
The map will be ignored if there is already a map associated with this item by the list itself.

Parameters:
map - the data, can be null

getPlaceholderMap

public PlaceholderMap getPlaceholderMap()
Gets additional information about this item.

Returns:
additional information, can be null
See Also:
setPlaceholderMap(PlaceholderMap)

putInteger

public void putInteger(String key,
                       int value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

putLong

public void putLong(String key,
                    long value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

putValue

public void putValue(String key,
                     double value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

putBoolean

public void putBoolean(String key,
                       boolean value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

putString

public void putString(String key,
                      String value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

put

public void put(String key,
                Object value)
Stores an additional key-value pair.

Parameters:
key - the key
value - the value

keys

public String[] keys()
Gets the keys of all the data that is stored.

Returns:
the keys, not null

getString

public String getString(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data
Throws:
IllegalArgumentException - if there is nothing stored for key or if the stored object has the wrong type

getInt

public int getInt(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data
Throws:
IllegalArgumentException - if there is nothing stored for key or if the stored object has the wrong type

getLong

public long getLong(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data
Throws:
IllegalArgumentException - if there is nothing stored for key or if the stored object has the wrong type

getDouble

public double getDouble(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data
Throws:
IllegalArgumentException - if there is nothing stored for key or if the stored object has the wrong type

getBoolean

public boolean getBoolean(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data
Throws:
IllegalArgumentException - if there is nothing stored for key or if the stored object has the wrong type

get

public Object get(String key)
Gets the data that is stored for key key.

Parameters:
key - the key of some entry
Returns:
the data, can be null

contains

public boolean contains(String key)
Tells whether some data is stored for key.

Parameters:
key - the key to search
Returns:
true if data exists, false otherwise