01: /*
02: * $Id: ITypeConverter.java 458456 2006-01-02 07:37:31Z jonl $ $Revision:
03: * 1.5 $ $Date: 2006-01-02 08:37:31 +0100 (Mon, 02 Jan 2006) $
04: *
05: * ==============================================================================
06: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
07: * use this file except in compliance with the License. You may obtain a copy of
08: * the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15: * License for the specific language governing permissions and limitations under
16: * the License.
17: */
18: package wicket.util.convert;
19:
20: import java.io.Serializable;
21: import java.util.Locale;
22:
23: /**
24: * Converter for a specific data type. The type of the conversion is implicit in
25: * the class which implements ITypeConverter. For example, a BooleanConverter
26: * which implements this interface might convert values from Object to Boolean.
27: *
28: * @author Jonathan Locke
29: */
30: public interface ITypeConverter extends Serializable {
31: /**
32: * Converts the given value
33: *
34: * @param value
35: * The value to convert
36: * @param locale
37: * @return The converted value
38: */
39: Object convert(Object value, Locale locale);
40: }
|