Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8946999

Browse files
🐶 opt
1 parent b70834a commit 8946999

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
*
6666
*
6767

68+
# 享元模式
69+
70+
6871

6972
###Emoj
7073
:smile: :dog: :sunny: :zap: :pig: :four_leaf_clover: :watermelon: :kissing_closed_eyes: :full_moon_with_face:

‎src/cn/ucaner/pattern/create/factory/factory/HumanFactory.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
*/
2727
public class HumanFactory extends AbsHumanFactory {
2828

29-
@Override
29+
@SuppressWarnings("unchecked")
30+
@Override
3031
public <T extends Human> T createHumen(Class<T> tClass) {
3132
Human humen=null;
3233
try {

‎src/cn/ucaner/pattern/create/prototype/DeepCopy.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
*/
2727
public class DeepCopy extends BaseMessage implements Cloneable {
2828

29-
@Override
29+
@SuppressWarnings("unchecked")
30+
@Override
3031
protected Object clone() throws CloneNotSupportedException {
3132
DeepCopy deepCopy=null;
3233
try {

‎src/cn/ucaner/pattern/create/prototype/PrototypeMain.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public static void main(String[] args) {
3434
*日期:2017/3/8/下午12:27
3535
*描述: 执行完可以看到 ShallowCopy 里面的arrayList一直是一个,没有变动过,所有在添加图片的时候,会再原有的基础上添加
3636
**/
37-
private static void shallowCopy(){
37+
@SuppressWarnings("unused")
38+
private static void shallowCopy(){
3839
ShallowCopy shallow=new ShallowCopy();
3940
shallow.setMessage("先生,您好。您的充气娃娃已经收货");
4041
shallow.setSend("MirsFang");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /