摘要:
Shape circle = new Circle(); Shape redCircle = new RedShapeDecorator(new Circle()); 看起来就像在Circle对象外包了一层RedShapeDecorator。 Shape redRectangle = new RedShapeDecorator(new Rectangle());让circle变成红色,使用对象没... 阅读全文
posted @ 2017-09-05 23:50
jugglee
阅读(118)
评论(0)
推荐(0)
摘要:
java.lang Interface Iterable<T> 实现该接口就可以使用for-each循环。 java.util Interface Iterator<E> 用于遍历Collection,有hasNext(),next(),remove()方法。 java.util Interface 阅读全文
posted @ 2017-09-05 21:39
jugglee
阅读(293)
评论(0)
推荐(0)

浙公网安备 33010602011771号