com.townleyenterprises.common
Class UseLastOverrideStrategy

java.lang.Object
  extended bycom.townleyenterprises.common.UseLastOverrideStrategy
All Implemented Interfaces:
OverrideStrategy

public final class UseLastOverrideStrategy
extends java.lang.Object
implements OverrideStrategy

This class implements the strategy that the second supplier (e.g. the newest or latest) always overrides the first or previous supplier.

Version:
$Id: UseLastOverrideStrategy.java,v 1.1 2004/07/29 18:30:49 atownley Exp $
Author:
Andrew S. Townley

Constructor Summary
UseLastOverrideStrategy()
           
 
Method Summary
 java.lang.Object resolve(java.lang.Object key, java.lang.Object s1, java.lang.Object s2)
          This method is used to determine the relationship between the two suppliers of a given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UseLastOverrideStrategy

public UseLastOverrideStrategy()
Method Detail

resolve

public java.lang.Object resolve(java.lang.Object key,
                                java.lang.Object s1,
                                java.lang.Object s2)
Description copied from interface: OverrideStrategy
This method is used to determine the relationship between the two suppliers of a given key. The method should return a reference for the object deemed to best provide the value for the given key.

Specified by:
resolve in interface OverrideStrategy
Parameters:
key - the key
s1 - the first supplier
s2 - the second supplier
Returns:
the object providing the property for the given key


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.