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

org.usc.file.operater.rules.ConvertFactory Maven / Gradle / Ivy

There is a newer version: 3.0.9
Show newest version
package org.usc.file.operater.rules;

/**
 * 转换工厂
 * 
 * @author ShunLi
 * @notes Created on 2010-12-11
* Revision of last commit:$Revision: 1347 $
* Author of last commit:$Author: [email protected] $
* Date of last commit:$Date: 2011-09-05 23:30:42 +0800 (周一, 05 九月 2011) $
*

*/ public class ConvertFactory { public static ConvertRule createConvertRule(Rule rule) { ConvertRule cr = new SmallToBigConvertRule(); // Default if (Rule.SmallToBig == rule) { cr = new SmallToBigConvertRule(); } else if (Rule.BigToSmall == rule) { cr = new BigToSmallConvertRule(); // cr = new SimpleBigToSmallConvertRule(); // simple 支持百一下的文件,快速一点 } else if (Rule.Prefix == rule) { cr = new PrefixConvertRule(); } else if (Rule.Suffix == rule) { cr = new SuffixConvertRule(); } else if (Rule.Replace == rule) { cr = new ReplaceConvertRule(); } return cr; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy