converters.as
来自「用于flash/flex的 as3的 2D图形图像图表的动态生成」· AS 代码 · 共 27 行
AS
27 行
package flare.data.converters
{
/**
* Factory class for looking up the appropriate IDataConverter for a
* given data format.
*/
public class Converters
{
private static var _lookup:Object = {
"json":new JSONConverter(),
"tab":new DelimitedTextConverter("\t"),
"graphml":new GraphMLConverter()
};
/**
* Returns a data converter for the input format type.
* @param type a format string (e.g., "tab" or "json").
* @return a data converter for the provided format, or null if no
* matching converter was found.
*/
public static function lookup(type:String):IDataConverter
{
return _lookup[type.toLowerCase()];
}
} // end of class Converters
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?