|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Decoration<K,V>
An interface for read-only decorations of arbitrary elements.
(This is a generalization of interfaces such as VertexPaintFunction and EdgeStringer
in the JUNG 1.x libraries.) Does not place any constraints on the
uniqueness of decorations; if you want a one-to-one mapping from
elements to decorations, see 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 Decoration
.
Examples of ways to instantiate this interface include:
Decorationvertex_stringer = new HashMap (); Decoration unit_edge_weight = new Decoration () { public Integer get(Edge e) { return 1; } };
SettableDecoration
,
BidiDecoration
,
SettableBidiDecoration
Method Summary | |
---|---|
V |
get(K key)
Returns the decoration (value) associated with the specified element key . |
Method Detail |
---|
V get(K key)
key
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |