... classes1.1
Any class that is not declared as abstract is ``concrete''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... superclass.1.2
In pathological cases, some repeated code may not be subject to factoring because of conflicts among possible factorings. For example, variants A and B may share code for method m
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... definition1.3
For a composite class hierarchy, use the top class.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...m1.4
The redefined method must have exactly the same name and input and output types as the method m that would have been inherited.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...false.1.5
This part of the equals specification is poorly designed because it unnecessarily complicates the behavior of equals without providing any useful benefit. A better specification would have stipulated that the behavior of equals on null was unspecified because null is outside the intended domain of the method.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... method.1.6
Of course, any static method can be converted to an instance method in some class, but the conversion is gratuitous since the static method code ignores this.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... definition;1.7
The return types of arithmetic operators generally depend on the types of their arguments. For some operator applications, the table immediately reports a type error.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...alternative;1.8
If neither arm of the conditional expression has a more general type, the program is not well-typed.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...VoidType.1.9
The Java libraries include a Void class, but it cannot be instantiated, so we must define our own VoidType.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... object.2.1
Every Java object has an associated hashcode which can be obtained using the method hashCode().
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... loop:2.2
With one minor exception involving the use of continue in the loop body. Since our Java subset does not include continue, it is not an issue.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... call2.3
Taking care to avoid interference from side effects!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...nested-class-name).2.4
Since classes may be nested to any depth, multiply nested classes have multiple qualifiers, one for each level of nesting.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... object.2.5
Another alternative is add an owner field to the abstract class List that refers to the containing QuasiList object but this approach complicates the form of the constructors for Cons and Empty, which must take an additional argument to initialize the owner field.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... sign.4.1
As we will explain shortly, Java supports several different sizes of integer representation; 31 binary digits plus sign is the default for integer constants.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.