task3/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 07 Oct 2008 11:05:34 +0200
changeset 45 251d0ed461fb
parent 29 task2/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java@f6073056b9fe
permissions -rw-r--r--
Copying all solution that advanced into round #3 into task3 directory
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 
     6 package org.apidesign.apifest08.currency;
     7 
     8 /**
     9  *
    10  * @author jdvorak
    11  */
    12 public class DelegatingConvertor implements Convertor {
    13     
    14     private final Convertor underlyingConvertor;
    15 
    16     public DelegatingConvertor( final Convertor underlyingConvertor ) {
    17         this.underlyingConvertor = underlyingConvertor;
    18     }
    19 
    20     protected Convertor getUnderlyingConvertor() {
    21         return underlyingConvertor;
    22     }
    23     
    24     public ConversionResult convert( final ConversionRequest req ) {
    25         return underlyingConvertor.convert( req );
    26     }
    27     
    28 }