设计模式
文章平均质量分 90
cywhoyi
这个作者很懒,什么都没留下…
展开
-
python为语言的设计模式
摘录自http://www.cnblogs.com/wuyuegb2312/archive/2013/04/09/3008320.html 一、简单工厂模式模式特点:工厂根据条件产生不同功能的类。程序实例:四则运算计算器,根据用户的输入产生相应的运算类,用这个运算类处理具体的运算。代码特点:C/C++中的switch...case...分支使用字典的方式代替。 ...原创 2013-12-24 09:28:03 · 126 阅读 · 0 评论 -
Memento Design Pattern
Memento pattern is one of the behavioral design pattern. Memento design pattern is used when we want to save the state of an object so that we can restore later on. Memento pattern is used to implem...原创 2013-08-07 11:29:56 · 187 阅读 · 0 评论 -
Loan pattern in Java
se CaseImplement separation between the code that holds resource from that of accessing it such that the accessing code doesn’t need to manage the resources. The use case mentioned holds true when...原创 2013-08-07 13:47:26 · 164 阅读 · 0 评论 -
A Simple Plugin System for Web Applications
We need to make multiple web-based projects with a lot of shared functionality. For that, some sort of a plugin system would be a good option (as an alternative to copy-pasting stuff). Some framewor...原创 2013-08-08 13:57:37 · 93 阅读 · 0 评论 -
Java Executor Framework
Java 5 introduced Thread pool in Java in form of Executor framework, which allows Java programmer to decouple submission of task to execution of task. If you are doing server side programming in Jav...原创 2013-08-09 12:34:08 · 111 阅读 · 0 评论 -
Java Priority Queue (PriorityQueue) Example
We know that Queue follows First-In-First-Out model but sometimes we need to process the objects in the queue based on the priority. For example, let’s say we have an application that generates stoc...原创 2013-08-09 16:15:31 · 123 阅读 · 0 评论 -
Core Java Interview Questions Answers in Finance domain Read more: http://javar
1. What is immutable object? Can you write immutable object?Immutable classes are Java classes whose objects can not be modified once created. Any modification in Immutable object result in new o...原创 2013-09-25 14:05:47 · 173 阅读 · 0 评论