Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–104 unchanged (104 lines)
105 if (obj == this) {
106 return true;
107 }
108 if (!(obj instanceof ShapeList)) {
109 return false;
110 }
111 return super.equals(obj);
112
113 }
114
115 /**
116 * Returns a hash code value for the object.
117 *
…lines 118–173 unchanged (56 lines)

After

…lines 1–104 unchanged (104 lines)
105 if (obj == this) {
106 return true;
107 }
108 if (!(obj instanceof ShapeList)) {
109 return false;
110 }
111 ShapeList that = (ShapeList) obj;
112 int listSize = size();
113 for (int i = 0; i < listSize; i++) {
114 if (!ShapeUtilities.equal((Shape) get(i), (Shape) that.get(i))) {
115 return false;
116 }
117 }
118 return true;
119
120 }
121
122 /**
123 * Returns a hash code value for the object.
124 *
…lines 125–180 unchanged (56 lines)

Before

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Shape"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ObjectInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ObjectOutputStream"
; ";"
block_comment "/**\n * A table of {@link Shape} objects.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ShapeList"
superclass
extends "extends"
type_identifier "AbstractObjectList"
class_body
{ "{"
block_comment "/**\n * Creates a new list.\n */"
constructor_declaration
modifiers
public "public"
identifier "ShapeList"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * Returns a {@link Shape} object from the list.\n "...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Sets the {@link Shape} for an item in the list. "...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns an independent copy of the list.\n *\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Tests the list for equality with another object ("...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "equals"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "obj"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "obj"
== "=="
this "this"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement (+21 nodes collapsed)
return_statement
return "return"
method_invocation
super "super"
. "."
identifier "equals"
argument_list
( "("
identifier "obj"
) ")"
; ";"
} "}"
block_comment "/**\n * Returns a hash code value for the object.\n *\n"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Provides serialization support.\n *\n * @pa"...
method_declaration (+133 nodes collapsed)
block_comment "/**\n * Provides serialization support.\n *\n * @pa"...
method_declaration (+110 nodes collapsed)
} "}"

After

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Shape"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ObjectInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ObjectOutputStream"
; ";"
block_comment "/**\n * A table of {@link Shape} objects.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ShapeList"
superclass
extends "extends"
type_identifier "AbstractObjectList"
class_body
{ "{"
block_comment "/**\n * Creates a new list.\n */"
constructor_declaration
modifiers
public "public"
identifier "ShapeList"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * Returns a {@link Shape} object from the list.\n "...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Sets the {@link Shape} for an item in the list. "...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns an independent copy of the list.\n *\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Tests the list for equality with another object ("...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "equals"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "obj"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "obj"
== "=="
this "this"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement (+21 nodes collapsed)
local_variable_declaration
type_identifier "ShapeList"
variable_declarator
identifier "that"
= "="
cast_expression
( "("
type_identifier "ShapeList"
) ")"
identifier "obj"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "listSize"
= "="
method_invocation
identifier "size"
argument_list
( "("
) ")"
; ";"
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "i"
< "<"
identifier "listSize"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "ShapeUtilities"
. "."
identifier "equal"
argument_list
( "("
cast_expression
( "("
type_identifier "Shape"
) ")"
method_invocation
identifier "get"
argument_list
( "("
identifier "i"
) ")"
, ","
cast_expression
( "("
type_identifier "Shape"
) ")"
method_invocation
identifier "that"
. "."
identifier "get"
argument_list
( "("
identifier "i"
) ")"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
return_statement
return "return"
true "true"
; ";"
} "}"
block_comment "/**\n * Returns a hash code value for the object.\n *\n"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Provides serialization support.\n *\n * @pa"...
method_declaration (+133 nodes collapsed)
block_comment "/**\n * Provides serialization support.\n *\n * @pa"...
method_declaration (+110 nodes collapsed)
} "}"