All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tuyang.beanutils.internal.convertors.EnumToStringArrayConvertor Maven / Gradle / Ivy

Go to download

BeanUtils library is a Java bean copy utility with powerful functionality and high performance.

The newest version!
package com.tuyang.beanutils.internal.convertors;

import com.tuyang.beanutils.BeanCopyConvertor;

@SuppressWarnings("rawtypes")
public class EnumToStringArrayConvertor implements BeanCopyConvertor {

	@Override
	public String[] convertTo(Enum[] object) {
		if( object == null )
			return null;
		String[] retList = new String[object.length];
		int i =0;
		for( Enum enum1 : object ) {
			retList[i++] = enum1.toString();
		}
		return retList;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy