Predicate를 이용한 리팩토링
To be import java.util.Arrays; import java.util.function.Predicate; public enum Ranking { FIRST(2000_000_000,6,false), SECOND(30_000_000,5, true), THIRD(1_500_000,5,false), FOURTH(50_000,4,false), FIFTH(5_000,3,false), NONE(0,0,false); private final int prize; private final int count; private final boolean hasBonusNumber; Ranking(int prize,int count,boolean hasBonusNumber){ this.prize=prize; thi..