01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15:
16: package org.griphyn.cPlanner.namespace.aggregator;
17:
18: /**
19: * An implementation of the Aggregator interface that always takes the
20: * new profile value. Updates the old value with the new value.
21: *
22: * @author Karan Vahi
23: * @version $Revision: 50 $
24: */
25: public class Update extends Abstract {
26:
27: /**
28: * Returns the minimum of two values.
29: *
30: * @param oldValue the existing value for the profile.
31: * @param newValue the new value being added to the profile.
32: * @param dflt the default value to be used in case the values
33: * are not of the correct type.
34: *
35: * @return the computed value as a String.
36: */
37: public String compute(String oldValue, String newValue, String dflt) {
38: //always return the new value. no sanity checks
39: return newValue;
40: }
41: }
|