edu.uci.ics.jung.algorithms.util
Class MapSettableTransformer<I,O>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.util.MapSettableTransformer<I,O>
All Implemented Interfaces:
SettableTransformer<I,O>, org.apache.commons.collections15.Transformer<I,O>

public class MapSettableTransformer<I,O>
extends Object
implements SettableTransformer<I,O>

A SettableTransformer that operates on an underlying Map instance. Similar to MapTransformer.

Author:
Joshua O'Madadhain

Field Summary
protected  Map<I,O> map
           
 
Constructor Summary
MapSettableTransformer(Map<I,O> m)
          Creates an instance based on m.
 
Method Summary
 void set(I input, O output)
          Sets the value (output) to be returned by a call to transform(input)).
 O transform(I input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected Map<I,O> map
Constructor Detail

MapSettableTransformer

public MapSettableTransformer(Map<I,O> m)
Creates an instance based on m.

Method Detail

transform

public O transform(I input)
Specified by:
transform in interface org.apache.commons.collections15.Transformer<I,O>

set

public void set(I input,
                O output)
Description copied from interface: SettableTransformer
Sets the value (output) to be returned by a call to transform(input)).

Specified by:
set in interface SettableTransformer<I,O>


Copyright © 2009. All Rights Reserved.