package com.pictc.converts.primitive;

import com.pictc.converts.TypeHandler;

public class StringHandler implements TypeHandler<String>{
	
	private Class<?>[] converts=new Class<?>[] {String.class};

	@Override
	public boolean isType(Class<?> type) {
		return String.class.equals(type);
	}

	@Override
	public Object convert(String value) {
		return value;
	}

	@Override
	public String valueToObject(Object val) {
		if(val==null) {
			return null;
		}
		return val.toString();
	}

	@Override
	public Class<?>[] getConverts() {
		return converts;
	}



}
