
设计模式
A-Liang
点点滴滴
展开
-
策略设计模式
妙计接口//妙计接口public interface IStrategy { //每个锦囊妙计都是一个可执行的算法 void operate(); }//妙计:找乔国老开后门public class BackDoor implements IStrategy { @Overrite public void operate() { System.out.println("找乔国老帮忙,让吴国太给孙权施加压力"); } }//妙计:吴国太开绿灯publ...原创 2021-06-23 11:52:22 · 177 阅读 · 0 评论 -
状态设计模式
常驻通知栏public void setFLAG_NO_CLEAR_Notification() { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); long when = Syste原创 2021-06-22 17:07:39 · 139 阅读 · 0 评论 -
建造者模式
?原创 2021-06-16 16:58:05 · 113 阅读 · 0 评论 -
工厂方法模式
synchronized publicstatic HttpClient getInstance(Context con) {}原创 2021-06-16 15:34:36 · 87 阅读 · 0 评论 -
访问者模式
2019-08-08 16:40:41.794 21041-21622/com.p3group.bmw E/XgStat: org.json.JSONException: Value �8�f���G of type java.lang.String cannot be converted to JSONObject at org.json.JSON.typeMismatch(JS...原创 2019-08-08 16:44:02 · 4297 阅读 · 1 评论 -
抽象工厂模式
记录工作中的奇葩事儿原创 2017-09-19 09:00:54 · 390 阅读 · 0 评论