(Dict.Prop<T> find, Function<Box, Collection<Box>> direction)
| 203 | return breadthFirst(direction).map(x -> x.properties.get(find)) |
| 204 | .filter(x -> x != null); |
| 205 | } |
| 206 | |
| 207 | @HiddenInAutocomplete |
| 208 | public <T> Optional<T> first(Dict.Prop<T> find, Function<Box, Collection<Box>> direction) { |
| 209 | if (properties.has(find)) return Optional.of(properties.get(find)); |
| 210 | return breadthFirst(direction).map(x -> x.properties.get(find)) |
| 211 | .filter(x -> x != null) |
| 212 | .findFirst(); |
| 213 | } |
| 214 |
no test coverage detected