MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / first

Method first

src/main/java/fieldbox/boxes/Box.java:205–211  ·  view source on GitHub ↗
(Dict.Prop<T> find, Function<Box, Collection<Box>> direction)

Source from the content-addressed store, hash-verified

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

Callers 15

InternalCSSMethod · 0.95
GraphicsSupportMethod · 0.95
IncrementMethod · 0.95
ComputeShaderSupportMethod · 0.95
WebAppsMethod · 0.95
beginMethod · 0.80
runMenuMethod · 0.80
runMenuHoldMethod · 0.80
defaultdrawsLinesMethod · 0.80
notifyMethod · 0.80
installMethod · 0.80

Calls 4

breadthFirstMethod · 0.95
getMethod · 0.65
hasMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected