Java Reference
In-Depth Information
DecoratorDemo.java An illustration of the decorator pattern,
including buffering, compression, and
serialization.
MemoryCell.java The MemoryCell class in Figure 4.22.
TestMemoryCell.java The test program for the memory cell class
shown in Figure 4.23.
SimpleArrayList.java The generic simplified ArrayList class in
Figure 4.24, with some additional methods.
A test program is provided in
ReadStringsWithSimpleArrayList.java .
PrimitiveWrapperDemo.java
Demonstrates the use of the Integer class, as
shown in Figure 4.25.
BoxingDemo.java Illustrates autoboxing and unboxing, as
shown in Figure 4.26.
StorageCellDemo.java The StorageCell adapter as shown in
Figure 4.27, and a test program.
FindMaxDemo.java The findMax generic algorithm in Figure 4.29.
GenericMemoryCell.java Illustrates the GenericMemoryCell class, in
Figure 4.30, updated to use Java 5 generics.
TestGenericMemoryCell.java tests the class.
GenericSimpleArrayList.java
The generic simplified ArrayList class in
Figure 4.37, with some additional methods.
A test program is provided in ReadStrings-
WithGenericSimpleArrayList.java .
GenericFindMaxDemo.java
Illustrates the generic findMax method in
Figure 4.36.
SimpleRectangle.java Contains the SimpleRectangle class in
Figure 4.38.
Comparator.java The Comparator interface in Figure 4.39.
CompareTest.java Illustrates the function object, with no nested
classes, as shown in Figure 4.41.
CompareTestInner1.java Illustrates the function object, with a nested
class, as shown in Figure 4.42.
CompareTestInner2.java Illustrates the function object, with a local
class, as shown in Figure 4.43.
CompareTestInner3.java Illustrates the function object, with an anony-
mous class, as shown in Figure 4.44.
Search WWH ::




Custom Search