returns direction that goes upwards if it can, otherwise downwards.
()
| 278 | |
| 279 | /** |
| 280 | * returns direction that goes upwards if it can, otherwise downwards. |
| 281 | */ |
| 282 | @HiddenInAutocomplete |
| 283 | public Function<Box, Collection<Box>> upwardsOrDownwards() { |
| 284 | return x -> { |
| 285 | if (x.parents().size() > 0) return x.parents(); |
| 286 | return x.children(); |
| 287 | }; |
| 288 | } |
| 289 |
no test coverage detected