001    package jp.osdl.jbento2.chart;
002    
003    public class DataSetBuilderFactory {
004    
005        public static DataSetBuilder getDataSetBuilder(String type) {
006            if (type.equals("category")) {
007                return new CategoryDataSetBuilder();
008            } else if (type.equals("xy")) {
009                return new XYDataSetBuilder();
010            } else if (type.equals("xydate")) {
011                return new XYDateDataSetBuilder();
012            }
013            throw new IllegalArgumentException("Unknown DataSetBuilder type :"
014                    + type);
015    
016        }
017    
018    }