Skip to content

Commit

Permalink
it`s good
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha1256 committed Jan 12, 2025
1 parent 16afe27 commit e16659d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 6 additions & 7 deletions src/main/java/practice/CandidateValidator.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package practice;

import model.Candidate;

import java.util.function.Predicate;
import model.Candidate;

public class CandidateValidator implements Predicate<Candidate> {
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";

Expand Down
11 changes: 7 additions & 4 deletions src/main/java/practice/StreamPractice.java
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -24,6 +26,7 @@ public int findMinEvenNumber(List<String> 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.
Expand Down

0 comments on commit e16659d

Please sign in to comment.