摘要: 简单工厂模式 总结: 客户端不用知道具体实现 通过工厂类返回接口实例 静态工厂 万能工厂可以创造很多不同类型实例 本质:选择 使用场景 阅读全文
posted @ 2018-09-21 10:33 人生途中的积累 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 外观模式 目的:让外部减少与子系统内多个模块的交互,松散耦合,从而让外部能够更简单的使用子系统 扩展:1.可以单利外观类 2.可以将外观类改成静态辅助工具类 3.可以将外观了改成接口,通过工厂模式获取接口实例调用相关外观方法 本质:封装交互,简化调用 阅读全文
posted @ 2018-09-21 10:32 人生途中的积累 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 老是忘,记下来 1字节=8位 byte 1个字节 8位boolean 1个字节 8位 char 2个字节 16位short 2个字节 16位 int 4个字节 32位float 4个字节 32位 double 8个字节 64位long 8个字节 64位 阅读全文
posted @ 2016-08-07 22:22 人生途中的积累 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you ... 阅读全文
posted @ 2015-04-14 16:08 人生途中的积累 阅读(237) 评论(0) 推荐(0) 编辑
摘要: /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fil... 阅读全文
posted @ 2015-04-14 16:00 人生途中的积累 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 1 package com.whj.ntwb; 2 3 import android.annotation.SuppressLint; 4 import android.app.Activity; 5 import android.app.AlertDialog; 6 import androi... 阅读全文
posted @ 2015-04-14 15:43 人生途中的积累 阅读(404) 评论(0) 推荐(0) 编辑