task3/solution07/src/org/apidesign/apifest08/currency/DelegatingConvertor.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 25 Oct 2008 20:53:00 +0200
changeset 84 2ae6e4aa7aef
parent 29 f6073056b9fe
permissions -rw-r--r--
Solutions by Petr Smid
     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 }