Java Reference
In-Depth Information
adapter class A class that is typically used when the interface of another class
is not exactly what is needed. The adapter provides a wrapping effect,
while changing the interface. (143)
anonymous class A class that has no name and is useful for implementing
short function objects. (163)
base class The class on which the inheritance is based. (114)
boxing Creating an instance of a wrapper class to store a primitive type. In
Java 5, this is done automatically. (145)
composition Preferred mechanism to inheritance when an IS-A relationship
does not hold. Instead, we say that an object of class B is composed of an
object of class A (and other objects). (110)
covariant arrays In Java, arrays are covariant, meaning that Derived[] is type
compatible with Base[] . (124)
covariant return type Overriding the return type with a subtype. This is
allowed starting in Java 5. (124)
decorator pattern The pattern that involves the combining of several wrappers
in order to add functionality. (141)
derived class A completely new class that nonetheless has some compatibility
with the class from which it was derived. (114)
dynamic dispatch A runtime decision to apply the method corresponding to
the actual referenced object. (117)
extends clause A clause used to declare that a new class is a subclass of
another class. (114)
final class A class that may not be extended. (120)
final method A method that may not be overridden and is invariant over the
inheritance hierarchy. Static binding is used for final methods. (119)
function object An object passed to a generic function with the intention of
having its single method used by the generic function. (158)
functor A function object. (158)
generic classes Added in Java 5, allows classes to specify type parameters and
avoid significant amounts of type casting. (150)
generic programming Used to implement type-independent logic. (142)
HAS-A relationship A relationship in which the derived class has a (instance of
the) base class. (110)
implements clause A clause used to declare that a class implements the meth-
ods of an interface. (135)
inheritance The process whereby we may derive a class from a base class
without disturbing the implementation of the base class. Also allows the
design of class hierarchies, such as Throwable and InputStream . (114)
 
Search WWH ::




Custom Search