Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
lab08
Commits
be161a59
Commit
be161a59
authored
6 years ago
by
Kelsi M. Riley
Browse files
Options
Download
Email Patches
Plain Diff
Override the equals method of the Point class
parent
9d2fcc27
kriley
1 merge request
!1
Override the equals method of the Point class
Pipeline
#9269
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/edu/caltech/cs2/lab08/Point.java
+8
-0
src/edu/caltech/cs2/lab08/Point.java
with
8 additions
and
0 deletions
+8
-0
src/edu/caltech/cs2/lab08/Point.java
View file @
be161a59
...
@@ -21,4 +21,12 @@ public class Point {
...
@@ -21,4 +21,12 @@ public class Point {
int
y
=
point
.
y
;
int
y
=
point
.
y
;
return
(
this
.
x
==
x
&&
this
.
y
==
y
);
return
(
this
.
x
==
x
&&
this
.
y
==
y
);
}
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
o
instanceof
Point
)
{
return
isEqual
((
Point
)
o
);
}
return
false
;
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help