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

Method upwardsOrDownwards

src/main/java/fieldbox/boxes/Box.java:280–286  ·  view source on GitHub ↗

returns direction that goes upwards if it can, otherwise downwards.

()

Source from the content-addressed store, hash-verified

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

Callers 2

MarkingMenusMethod · 0.80
preprocessMethod · 0.80

Calls 3

parentsMethod · 0.80
childrenMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected