Skip to content

Commit

Permalink
add bridge for shen0834
Browse files Browse the repository at this point in the history
  • Loading branch information
hehonghui committed Mar 15, 2015
1 parent c5affd8 commit e13342f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
| [装饰模式](decorator/tiny-times) | [tiny-times](https://github.com/tiny-times) | 撒丫子赶稿中 |
| [享元模式](flyweight/lvtea0105) | [lvtea0105](https://github.com/lvtea0105) | 撒丫子赶稿中 |
| [迭代器模式](iterator/haoxiqiang) | [Haoxiqiang](https://github.com/Haoxiqiang)| 待校对 |
| [责任链模式](chain-of-responsibility/AigeStudio) | [AigeStudio](https://github.com/AigeStudio)| SM哥校对中 |
| [责任链模式](chain-of-responsibility/AigeStudio) | [AigeStudio](https://github.com/AigeStudio)| 完成 |
| [工厂方法模式](factory-method/AigeStudio) | [AigeStudio](https://github.com/AigeStudio)| 撒丫子赶稿中 |
| [抽象工厂模式](abstract-factory/AigeStudio) | [AigeStudio](https://github.com/AigeStudio)| 撒丫子赶稿中 |
| [状态模式](state/Thinan) | [Thinan](https://www.github.com/Thinan)| 撒丫子赶稿中 |
| [命令模式](Command/lijunhuayc) | [lijunhuayc](https://github.com/lijunhuayc)| 匍匐前进ing |
| [桥接模式](bridge/shen0834) | [shen0834](https://github.com/shen0834)| 撒丫子赶稿中 |


## 目前无人认领的模式
Expand Down
58 changes: 58 additions & 0 deletions bridge/shen0834/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Android设计模式源码解析之${模式名}
====================================
> 本文为 [Android 设计模式源码解析](https://github.com/simple-android-framework-exchange/android_design_patterns_analysis) 中 ${模式名} 分析
> Android系统版本: ${系统版本号,例如 4.2.1}
> 分析者:[${分析者}](${分析者 Github 地址}),分析状态:未完成,校对者:[Mr.Simple](https://github.com/bboyfeiyu),校对状态:未开始

`复制一份到自己的项目文件夹下,然后根据自己项目替换掉 ${} 内容,删掉本行及上面两行。`

该任务不仅要用java写出该模式的一个简单示例,还有分析该模式在Android源码中的应用,可以参考[Mr.Simple的单例模式](singleton/mr.simple/readme.md)[Mr.Simple的观察者模式](observer/mr.simple/readme.md)


## 1. 模式介绍

### 模式的定义
`模式的一句话定义`


### 模式的使用场景



## 2. UML类图
`这里是该设计模式的经典UML图`

### 角色介绍
`对UML图中的各个角色进行介绍`




## 3. 模式的简单实现
### 简单实现的介绍
`自己实现一个小型模式案例,通过这个案例让读者了解这个模式的一般应用`

### 实现源码
`上述案例的源码实现`


### 总结
`对上述的简单示例进行总结说明`




## Android源码中的模式实现
`分析源码中的模式实现,列出相关源码,以及使用该模式原因等`




## 4. 杂谈
该模式的优缺点以及自己的一些感悟,非所有项目必须。



`写完相关内容之后到开发群告知管理员,管理员安排相关人员进行审核,审核通过之后即可。`

Binary file added iterator/.DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion iterator/haoxiqiang/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ while(iter.hasNext()){
String key = (String)iter.next();
String value = menuObj.getString(key);
}
```
```
就目前而言,各种高级语言都有对迭代器的基本实现,没必要自己实现迭代器,使用内置的迭代器即可满足日常需求。

## Android源码中的模式实现
一个集合想要实现Iterator很是很简单的,需要注意的是每次需要重新生成一个Iterator来进行遍历.且遍历过程是单方向的,HashMap是通过一个类似HashIterator来实现的,我们为了解释简单,这里只是研究ArrayList(此处以Android L源码为例,其他版本略有不同)

Expand Down

0 comments on commit e13342f

Please sign in to comment.