001 /* 002 * Copyright 2003-2004 The Apache Software Foundation 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.apache.commons.convert1; 017 018 019 /** 020 * Converter that does no conversion. 021 * 022 * @author Henri Yandell 023 * @since 0.1 024 */ 025 //H? Thought this had use. Might be a waste though. 026 /// Does have use in tests at least. 027 public class IdentityConverter implements Converter { 028 029 030 /** 031 * Performs no conversion, merely returns the input as output. 032 * 033 * @param type Data type to which this value should be converted 034 * @param value The input value to be converted 035 * 036 * @exception ConversionException if conversion cannot be performed 037 * successfully 038 */ 039 public Object convert(Class type, Object value) { 040 return value; 041 } 042 043 044 }