Coverage Report - net.sourceforge.jeuclid.context.typewrapper.StringTypeWrapper
 
Classes in this File Line Coverage Branch Coverage Complexity
StringTypeWrapper
0%
0/6
N/A
1
 
 1  
 /*
 2  
  * Copyright 2008 - 2008 JEuclid, http://jeuclid.sf.net
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *      http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 /* $Id: StringTypeWrapper.java,v 03dc0884e86f 2008/06/21 10:53:35 maxberger $ */
 18  
 
 19  
 package net.sourceforge.jeuclid.context.typewrapper;
 20  
 
 21  
 /**
 22  
  * Converting String to String is trivial...
 23  
  * 
 24  
  * @version $Revision: 03dc0884e86f $
 25  
  */
 26  
 public final class StringTypeWrapper extends AbstractSimpleTypeWrapper {
 27  
 
 28  
     /**
 29  
      * 
 30  
      */
 31  
     private static final long serialVersionUID = 1L;
 32  
 
 33  0
     private static final TypeWrapper INSTANCE = new StringTypeWrapper();
 34  
 
 35  
     /** Simple c'tor. */
 36  
     private StringTypeWrapper() {
 37  0
         super(String.class);
 38  0
     }
 39  
 
 40  
     /**
 41  
      * @return the singleton instance.
 42  
      */
 43  
     public static TypeWrapper getInstance() {
 44  0
         return StringTypeWrapper.INSTANCE;
 45  
     }
 46  
 
 47  
     /** {@inheritDoc} */
 48  
     @Override
 49  
     public Object fromString(final String value) {
 50  0
         return value;
 51  
     }
 52  
 
 53  
     /** {@inheritDoc} */
 54  
     @Override
 55  
     public String toString(final Object value) {
 56  0
         return (String) value;
 57  
     }
 58  
 }