public interface SettableDecoration<K,V> extends Decoration<K,V>
BidiDecoration
or
SettableBidiDecoration
.
The purpose of this interface is to provide a simple unifying mechanism
for accessing element (meta)data, which may be variously stored in
instance fields, auxiliary data structures such as Map
instances,
or the JUNG user data repository.
This interface is designed so as to be compatible with the Map
interface--that is, so that a Map
instance can serve as a
SettableDecoration
.
Examples of ways to instantiate this interface include:
SettableDecoration(The second example assumes that you have defined a class calledvertex_stringer = new HashMap (); SettableDecoration edge_weight = new Decoration () { public Integer get(MyEdge e) { return e.getWeight(); } public void put(MyEdge e, Integer i) { e.setWeight(i); } };
MyEdge
that provides getWeight()
and setWeight
methods.)Decoration
,
BidiDecoration
,
SettableBidiDecoration