Rev 767 | Rev 771 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 767 | Rev 770 | ||
|---|---|---|---|
| Line 138... | Line 138... | ||
| 138 | }
|
138 | }
|
| 139 | }); |
139 | }); |
| 140 | }
|
140 | }
|
| 141 | 141 | ||
| 142 | public void preencherOutrosPadroes() { |
142 | public void preencherOutrosPadroes() { |
| 143 | padroesComG3 = padroes.stream() |
- | |
| - | 143 | padroesComG3 = padroes.stream() |
|
| 144 | .filter(p -> p.getGatilho2() != null && p.getGatilho3() != null) |
144 | .filter(p -> p.getGatilho2() != null && p.getGatilho3() != null) |
| 145 | .collect(Collectors.toList()); |
145 | .collect(Collectors.toList()); |
| 146 | inverterLista(padroesComG3); |
- | |
| - | 146 | padroesComG3 = inverterLista(padroesComG3); |
|
| 147 | 147 | ||
| 148 | padroesAteG2 = padroes.stream() |
148 | padroesAteG2 = padroes.stream() |
| 149 | .filter(p -> p.getGatilho2() != null && p.getGatilho3() == null) |
149 | .filter(p -> p.getGatilho2() != null && p.getGatilho3() == null) |
| 150 | .collect(Collectors.toList()); |
150 | .collect(Collectors.toList()); |
| 151 | inverterLista(padroesAteG2); |
- | |
| - | 151 | padroesAteG2 = inverterLista(padroesAteG2); |
|
| 152 | }
|
152 | }
|
| 153 | 153 | ||
| 154 | public static List<PadraoGatilho> inverterLista(List<PadraoGatilho> candles) { |
154 | public static List<PadraoGatilho> inverterLista(List<PadraoGatilho> candles) { |
| 155 | List<PadraoGatilho> invertida = new ArrayList<>(candles); |
155 | List<PadraoGatilho> invertida = new ArrayList<>(candles); |
| 156 | Collections.reverse(invertida); |
156 | Collections.reverse(invertida); |