竹岭
webdd · 共 10 篇文章
The Common Java cookbook 笔记(1)
1.4.1. Problem You want to automate the creation of toString( ) methods. 1.4.2. Solution Use the Commons Lang ReflectionToStringBuilder or ToStringBuilder and ToStringBuilder to create toString() methods. The following code is an example of a toString( ) method, which uses a reflection builder: imp…
2009-08-15 14:19 · J2EE · 评论(0)
面向对象的设计原则
收藏一些链接,感觉写得挺不错 面向对象的设计原则一 开放-关闭原则 面向对象的设计原则二-单一职责原则 面向对象的设计原则三 - 接口隔离原则 面向对象的设计原则四 - 里氏代换原则 面向对象的设计原则五 - 依赖倒转原则 面向对象设计原则六 - 针对接口编程,而不是针对实现编程 面向对象设计原则七 - 组合优先于继承
2009-08-15 11:03 · Design · 评论(0)
Java theory and practice: To mutate or not to mutate?
Summary: Immutable objects have a number of properties that make working with them easier, including relaxed synchronization requirements and the freedom to share and cache object references without concern for data corruption. While immutability may not necessarily make sense for all classes, most…
2009-08-15 00:32 · JAVA Core · 评论(0)
Java theory and practice: Building a better HashMap
Summary: ConcurrentHashMap , part of Doug Lea's util.concurrent package, offers a higher degree of concurrency than Hashtable or synchronizedMap . In addition, it manages to avoid locking completely for most successful get() operations, which results in excellent throughput in concurrent applicatio…
2009-08-15 00:27 · JAVA Core · 评论(0)
Java theory and practice: Concurrent collections classes
Summary: In addition to many other useful concurrency building blocks, Doug Lea's util.concurrent package contains high-performance, thread-safe implementations for workhorse collection types List and Map . This month, Brian Goetz shows you how many concurrent programs will benefit from simply repl…
2009-08-15 00:23 · JAVA Core · 评论(0)
Java theory and practice: A brief history of garbage collection
The benefits of garbage collection are indisputable -- increased reliability, decoupling of memory management from class interface design, and less developer time spent chasing memory management errors. The well-known problems of dangling pointers and memory leaks simply do not occur in Java progra…
2009-08-15 00:04 · Performance · 评论(0)
Java theory and practice: Garbage collection and performance
In the early days of Java technology, allocating objects got a pretty bad rap. There were lots of articles (including some by this author) advising developers to avoid creating temporary objects unnecessarily because allocation (and the corresponding garbage-collection overhead) was expensive. Whil…
2009-08-14 23:33 · Performance · 评论(0)
Removing GC Synchronisation
Removing GC Synchronisation Andy C. King ak32@ukc.ac.uk ACM No. 5256805 Computing Laboratory University of Kent Canterbury, Kent, CT2 7NF, UK Richard Jones (Advisor) R.E.Jones@ukc.ac.uk <!-- Format Problem and motivation<br> Background & related work<br> Uniqueness of approach<br> Results and contr…
2009-08-14 23:15 · Performance · 评论(0)
Tuning Garbage Collection with the 1.4.2 Java[tm] Virtual Machine
Table of Contents 1 Introduction 2 Generations 2.1 Performance Considerations 2.2 Measurement 3 Sizing the Generations 3.1 Total Heap 3.2 The Young Generation 3.2.1 Young Generation Guarantee 4 Types of Collectors 4.1When to Use the Throughput Collector 4.2 The Throughput Collector 4.2.1 Adaptive S…
2009-08-14 22:55 · Performance · 评论(0)
Java theory and practice: Hashing it out --hashCode
Summary: Every Java object has a hashCode() and an equals() method. Many classes override the default implementations of these methods to provide a higher degree of semantic comparability between object instances. In this installment of Java theory and practice , Java developer Brian Goetz shows yo…
2009-08-14 22:08 · JAVA Core · 评论(0)