java – How to rewrite the search function for nested lists using streams

Given a listing, each unicorn containing a listing, return the unicorn and the latest runner information for a subset of runners.

I wrote this as such:

static Optional <ImmutablePair> findLatestExperiencedRiderInfo (
final list unicorns) {

Rider latestExperiencedRider = null;
Unicorn unicornOfLatestExperiencedRider = null;
long latestRideTime = 0L;

for (Final Unicorn: Unicorns) {
for (final driver: unicorns.getRiders ()) {
if (rider.getType () == Rider.Type.EXPERIENCED) {
last time long = rider.getRideTime ();
if (time> latestRideTime) {
latestRideTime = time;
latestExperiencedRider = rider;
unicornOfLatestExperiencedRider = unicorn;
}
}
}
}

return latestExperiencedRider == null
? Optional.empty ()
: Optional.of (new ImmutablePair <> (
unicornOfLatestExperiencedRider,
latestExperiencedRider));
}

I was hoping for a more succinct version, possibly using feeds (or just written differently). What would your suggestions be?