1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/task4/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java Sat Oct 11 23:38:46 2008 +0200
1.3 @@ -0,0 +1,28 @@
1.4 +/*
1.5 + * To change this template, choose Tools | Templates
1.6 + * and open the template in the editor.
1.7 + */
1.8 +
1.9 +package org.apidesign.apifest08.currency;
1.10 +
1.11 +/**
1.12 + *
1.13 + * @author jdvorak
1.14 + */
1.15 +public class DelegatingConvertor implements Convertor {
1.16 +
1.17 + private final Convertor underlyingConvertor;
1.18 +
1.19 + public DelegatingConvertor( final Convertor underlyingConvertor ) {
1.20 + this.underlyingConvertor = underlyingConvertor;
1.21 + }
1.22 +
1.23 + protected Convertor getUnderlyingConvertor() {
1.24 + return underlyingConvertor;
1.25 + }
1.26 +
1.27 + public ConversionResult convert( final ConversionRequest req ) {
1.28 + return underlyingConvertor.convert( req );
1.29 + }
1.30 +
1.31 +}