mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 03:01:12 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -27,9 +27,7 @@ package com.iluwatar.doubledispatch;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* Rectangle has coordinates and can be checked for overlap against other Rectangles.
|
||||
*/
|
||||
/** Rectangle has coordinates and can be checked for overlap against other Rectangles. */
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public class Rectangle {
|
||||
@@ -40,8 +38,10 @@ public class Rectangle {
|
||||
private final int bottom;
|
||||
|
||||
boolean intersectsWith(Rectangle r) {
|
||||
return !(r.getLeft() > getRight() || r.getRight() < getLeft() || r.getTop() > getBottom() || r
|
||||
.getBottom() < getTop());
|
||||
return !(r.getLeft() > getRight()
|
||||
|| r.getRight() < getLeft()
|
||||
|| r.getTop() > getBottom()
|
||||
|| r.getBottom() < getTop());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user