1 /*
2 * CSVeed (https://github.com/42BV/CSVeed)
3 *
4 * Copyright 2013-2023 CSVeed.
5 *
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of The Apache Software License,
8 * Version 2.0 which accompanies this distribution, and is available at
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 */
11 package org.csveed.bean.conversion;
12
13 /**
14 * The Class AbstractConverter.
15 *
16 * @param <K>
17 * the key type
18 */
19 public abstract class AbstractConverter<K> implements Converter<K> {
20
21 /** The clazz. */
22 private Class<K> clazz;
23
24 /**
25 * Instantiates a new abstract converter.
26 *
27 * @param clazz
28 * the clazz
29 */
30 protected AbstractConverter(Class<K> clazz) {
31 this.clazz = clazz;
32 }
33
34 @Override
35 public String infoOnType() {
36 return getType().getName();
37 }
38
39 @Override
40 public Class<K> getType() {
41 return clazz;
42 }
43
44 }