View Javadoc
1   /*
2    * Created on Aug 5, 2007
3    *
4    * Copyright (c) 2007, The JUNG Authors 
5    *
6    * All rights reserved.
7    *
8    * This software is open-source under the BSD license; see either
9    * "license.txt" or
10   * https://github.com/jrtom/jung/blob/master/LICENSE for a description.
11   */
12  package edu.uci.ics.jung.algorithms.util;
13  
14  import com.google.common.base.Function;
15  
16  /**
17   * An interface for classes that can set the value to be returned (from <code>transform()</code>)
18   * when invoked on a given input.
19   * 
20   * @author Joshua O'Madadhain
21   */
22  public interface SettableTransformer<I, O> extends Function<I, O>
23  {
24      /**
25       * Sets the value (<code>output</code>) to be returned by a call to 
26       * <code>transform(input)</code>).
27       * @param input the value whose output value is being specified
28       * @param output the output value for {@code input}
29       */
30      public void set(I input, O output);
31  }