File tree Expand file tree Collapse file tree 17 files changed +17
-34
lines changed
jpx/src/main/java/io/jenetics/jpx Expand file tree Collapse file tree 17 files changed +17
-34
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,7 @@ public int hashCode() {
117117
118118 @ Override
119119 public boolean equals (final Object obj ) {
120- return obj == this ||
121- obj instanceof Bounds bounds &&
120+ return obj instanceof Bounds bounds &&
122121 Objects .equals (bounds ._minLatitude , _minLatitude ) &&
123122 Objects .equals (bounds ._minLongitude , _minLongitude ) &&
124123 Objects .equals (bounds ._maxLatitude , _maxLatitude ) &&
@@ -140,7 +139,6 @@ public String toString() {
140139 * Return a collector which calculates the bounds of a given way-point
141140 * stream. The following example shows how to calculate the bounds of all
142141 * track-points of a given GPX object.
143- *
144142 * {@snippet lang="java":
145143 * final Bounds bounds = gpx.tracks()
146144 * .flatMap(Track::segments)
Original file line number Diff line number Diff line change @@ -103,8 +103,7 @@ public int hashCode() {
103103
104104 @ Override
105105 public boolean equals (final Object obj ) {
106- return obj == this ||
107- obj instanceof Copyright cr &&
106+ return obj instanceof Copyright cr &&
108107 Objects .equals (cr ._author , _author ) &&
109108 Objects .equals (cr ._year , _year ) &&
110109 Objects .equals (cr ._license , _license );
Original file line number Diff line number Diff line change @@ -120,8 +120,7 @@ public int hashCode() {
120120
121121 @ Override
122122 public boolean equals (final Object obj ) {
123- return obj == this ||
124- obj instanceof DGPSStation dgps &&
123+ return obj instanceof DGPSStation dgps &&
125124 dgps ._value == _value ;
126125 }
127126
Original file line number Diff line number Diff line change @@ -105,8 +105,7 @@ public int hashCode() {
105105
106106 @ Override
107107 public boolean equals (final Object obj ) {
108- return obj == this ||
109- obj instanceof Email email &&
108+ return obj instanceof Email email &&
110109 Objects .equals (email ._id , _id ) &&
111110 Objects .equals (email ._domain , _domain );
112111 }
Original file line number Diff line number Diff line change @@ -472,8 +472,7 @@ public int hashCode() {
472472
473473 @ Override
474474 public boolean equals (final Object obj ) {
475- return obj == this ||
476- obj instanceof GPX gpx &&
475+ return obj instanceof GPX gpx &&
477476 Objects .equals (gpx ._creator , _creator ) &&
478477 Objects .equals (gpx ._version , _version ) &&
479478 Objects .equals (gpx ._metadata , _metadata ) &&
Original file line number Diff line number Diff line change @@ -192,8 +192,7 @@ public int hashCode() {
192192
193193 @ Override
194194 public boolean equals (final Object obj ) {
195- return obj == this ||
196- obj instanceof Length lng &&
195+ return obj instanceof Length lng &&
197196 Double .compare (lng ._value , _value ) == 0 ;
198197 }
199198
Original file line number Diff line number Diff line change @@ -101,8 +101,7 @@ public int hashCode() {
101101
102102 @ Override
103103 public boolean equals (final Object obj ) {
104- return obj == this ||
105- obj instanceof Link link &&
104+ return obj instanceof Link link &&
106105 Objects .equals (link ._href , _href ) &&
107106 Objects .equals (link ._text , _text ) &&
108107 Objects .equals (link ._type , _type );
Original file line number Diff line number Diff line change @@ -270,8 +270,7 @@ public int hashCode() {
270270
271271 @ Override
272272 public boolean equals (final Object obj ) {
273- return obj == this ||
274- obj instanceof Metadata meta &&
273+ return obj instanceof Metadata meta &&
275274 Objects .equals (meta ._name , _name ) &&
276275 Objects .equals (meta ._description , _description ) &&
277276 Objects .equals (meta ._author , _author ) &&
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ public int hashCode() {
292292
293293 @ Override
294294 public boolean equals (final Object o ) {
295- return o == this || _adoptee .equals (o );
295+ return o instanceof List <?> list && _adoptee .equals (list );
296296 }
297297
298298}
Original file line number Diff line number Diff line change @@ -116,8 +116,7 @@ public int hashCode() {
116116
117117 @ Override
118118 public boolean equals (final Object obj ) {
119- return obj == this ||
120- obj instanceof Person person &&
119+ return obj instanceof Person person &&
121120 Objects .equals (person ._name , _name ) &&
122121 Objects .equals (person ._email , _email ) &&
123122 Objects .equals (person ._link , _link );
You can’t perform that action at this time.
0 commit comments