diff --git a/src/main/java/practice/CandidateValidator.java b/src/main/java/practice/CandidateValidator.java index 00ddd93f..b52818a3 100644 --- a/src/main/java/practice/CandidateValidator.java +++ b/src/main/java/practice/CandidateValidator.java @@ -1,15 +1,14 @@ package practice; -import model.Candidate; - import java.util.function.Predicate; +import model.Candidate; public class CandidateValidator implements Predicate { - private final static int PERIOD = 10; - private final static int MIN_AGE = 35; - private final static String SYMBOL = "-"; - private final static int FROM = 0; - private final static int TO = 1; + private static final int PERIOD = 10; + private static final int MIN_AGE = 35; + private static final String SYMBOL = "-"; + private static final int FROM = 0; + private static final int TO = 1; private final static String NATION = "Ukrainian"; diff --git a/src/main/java/practice/StreamPractice.java b/src/main/java/practice/StreamPractice.java index d0de78cb..c5c04619 100644 --- a/src/main/java/practice/StreamPractice.java +++ b/src/main/java/practice/StreamPractice.java @@ -1,12 +1,14 @@ package practice; -import java.util.*; +import model.Person; +import model.Candidate; + +import java.util.Arrays; +import java.util.List; +import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.IntStream; -import model.Candidate; -import model.Person; - public class StreamPractice { /** * Given list of strings where each element contains 1+ numbers: @@ -24,6 +26,7 @@ public int findMinEvenNumber(List numbers) { .orElseThrow(() -> new RuntimeException("Can't get min value from list: " + numbers)); } + /** * Given a List of Integer numbers, * return the average of all odd numbers from the list or throw NoSuchElementException.