📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions

View File

@ -25,8 +25,7 @@ package com.iluwatar.spatialpartition;
import java.security.SecureRandom;
import java.util.HashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* <p>The idea behind the <b>Spatial Partition</b> design pattern is to enable efficient location
@ -57,8 +56,8 @@ import org.slf4j.LoggerFactory;
* speed of the game.</p>
*/
@Slf4j
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
private static final String BUBBLE = "Bubble ";
static void noSpatialPartition(int numOfMovements, HashMap<Integer, Bubble> bubbles) {

View File

@ -26,16 +26,15 @@ package com.iluwatar.spatialpartition;
import java.security.SecureRandom;
import java.util.Collection;
import java.util.HashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* Bubble class extends Point. In this example, we create several bubbles in the field, let them
* move and keep track of which ones have popped and which ones remain.
*/
@Slf4j
public class Bubble extends Point<Bubble> {
private static final Logger LOGGER = LoggerFactory.getLogger(Bubble.class);
private static final SecureRandom RANDOM = new SecureRandom();
final int radius;