Back to project page BoxSorter.
The source code is released under:
GNU General Public License
If you think the Android project BoxSorter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.silverhillapps.boxsorter.subviews; /* www . j a va 2s. co m*/ import android.content.Context; import com.silverhillapps.boxsorter.conf.Constants; /** * This is the factory creator for the Figures * @author salva * */ public class FigureFactory { private Context mContext; public FigureFactory(Context context){ this.mContext = context; } public Figure createFigure(int code){ Figure out = null; switch(code){ case Constants.CIRCLE_CODE: out = new Circle(mContext, null); break; case Constants.SQUARE_CODE: out = new Square(mContext, null); break; } return out; } }