bibliothek.gui.dock.util
Class DockProperties.Entry<A>

java.lang.Object
  extended by bibliothek.gui.dock.util.DockProperties.Entry<A>
Type Parameters:
A - the type of the value
Enclosing class:
DockProperties

private class DockProperties.Entry<A>
extends java.lang.Object

An entry that contains key, listeners and a value.

Author:
Benjamin Sigg

Field Summary
private  PropertyKey<A> key
          the name of this entry
private  java.util.List<DockPropertyListener<A>> listeners
          listeners to this entry
private  A value
          the value stored in this entry
 
Constructor Summary
private DockProperties.Entry()
           
 
Method Summary
 void addListener(DockPropertyListener<A> listener)
          Adds a new listener to this entry.
 PropertyKey<A> getKey()
          Gets the name of this entry.
 A getValue()
          Gets the value of this entry.
 boolean removeable()
          Tells whether this entry is needed any longer or not.
 void removeListener(DockPropertyListener<A> listener)
          Removes a listener from this entry.
 void setValue(A value)
          Sets the new value of this entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private PropertyKey<A> key
the name of this entry


listeners

private java.util.List<DockPropertyListener<A>> listeners
listeners to this entry


value

private A value
the value stored in this entry

Constructor Detail

DockProperties.Entry

private DockProperties.Entry()
Method Detail

setValue

public void setValue(A value)
Sets the new value of this entry.

Parameters:
value - the new value

getValue

public A getValue()
Gets the value of this entry.

Returns:
the value

getKey

public PropertyKey<A> getKey()
Gets the name of this entry.

Returns:
the name

addListener

public void addListener(DockPropertyListener<A> listener)
Adds a new listener to this entry.

Parameters:
listener - the new listener

removeListener

public void removeListener(DockPropertyListener<A> listener)
Removes a listener from this entry.

Parameters:
listener - the listener to remove

removeable

public boolean removeable()
Tells whether this entry is needed any longer or not.

Returns:
true if this entry can be deleted safely.