Optional<Result> find(Direction direction) {
    int key = direction.asInt();
    for (DirectionResultPair result : results) {
      if (result.directionKey == key) {
        return Optional.of(result).map(pair -> pair.result);
      }
    }
    return Optional.empty();
  }
Optional<Result> find(Direction direction)