-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
166 lines (99 loc) · 4.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>不积跬步何以至千里</title>
<meta name="author" content="Zww">
<meta name="description" content="分享个人学习到的设计模式,微服务等相关的基础知识">
<meta name="keywords" content="设计模式,微服务">
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta property="og:site_name" content="不积跬步何以至千里"/>
<meta property="og:image" content="/favicon.ico"/>
<link href="/favicon.ico" rel="icon">
<link rel="alternate" href="/atom.xml" title="不积跬步何以至千里" type="application/atom+xml">
<link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">
</head>
<body>
<div class="blog">
<div class="content">
<header>
<div class="site-branding">
<h1 class="site-title">
<a href="/">不积跬步何以至千里</a>
</h1>
<p class="site-description"></p>
</div>
<nav class="site-navigation">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">归档</a></li>
<li><a href="/categories">分类</a></li>
<li><a href="/tags">标签</a></li>
</ul>
</nav>
</header>
<main class="site-main posts-loop">
<article>
<h3 class="article-title"><a href="/2018/07/25/Java设计模式-策略模式/"><span>Java设计模式-策略模式</span></a></h3>
<div class="article-top-meta">
<span class="posted-on">
<a href="/2018/07/25/Java设计模式-策略模式/" rel="bookmark">
<time class="entry-date published" datetime="2018-07-25T14:18:28.000Z">
2018-07-25
</time>
</a>
</span>
</div>
<div class="article-content">
<div class="entry">
<h4 id="一、策略模式看起来的样子"><a href="#一、策略模式看起来的样子" class="headerlink" title="一、策略模式看起来的样子"></a>一、策略模式看起来的样子</h4>
<img src="/2018/07/25/Java设计模式-策略模式/策略模式.bmp" class="slug">
<h4 id="二、总结"><a href="#二、总结" class="headerlink" title="二、总结"></a>二、总结</h4><ul>
<li>将经常变化的部分提取出来,单独作为一个类,形成算法族。</li>
<li>变化部分的方法委托给抽象类完成,运行时可以自动执行对应的算法。</li>
<li>通过set方法,使得具体算法的执行可以在运行时动态指定。</li>
</ul>
<hr>
<blockquote>
<p>如果你的世界是一条一维的曲线,即便是一颗小小的沙砾也会成为你永远迈不过去的坎;如果你的世界是一张二维的曲面,哪怕是一条细若游丝的线,也会成为横亘你面前永远无法逾越的鸿沟</p>
</blockquote>
</div>
</div>
<div class="article-footer">
<div class="article-meta pull-left">
<span class="post-categories">
<i class="icon-categories"></i>
<a href="/categories/设计模式/">设计模式</a>
</span>
<span class="post-tags">
<i class="icon-tags"></i>
<a href="/tags/策略模式/">策略模式</a>
</span>
</div>
<div class="article-meta pull-right">
<span>
<i class="icon-comments"></i>
<span>
<a href="/2018/07/25/Java设计模式-策略模式/#comment">评论</a>
</span>
</span>
</div>
</div>
</article>
<nav class="pagination">
</nav>
</main>
<footer class="site-footer">
<p class="site-info">
Proudly powered by <a href="https://hexo.io/" target="_blank">Hexo</a> and
Theme by <a href="https://github.com/CodeDaraW/Hacker" target="_blank">Hacker</a>
</br>
© 2018 Zww
</p>
</footer>
</div>
</div>
</body>
</html>