task4/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 11 Oct 2008 23:38:46 +0200
changeset 61 58ec6da75f6f
parent 45 task3/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java@251d0ed461fb
permissions -rw-r--r--
Copying structure for task4
     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 }