/* package whatever; // don't place package name! */
import java.util.stream.*;
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Optional<Long> opt1 = Optional.of(13l);
Optional<String> opt2 = Optional.empty();
Optional<String> opt3 = Optional.of("something");
Stream<Optional> fields = Stream.of(opt1, opt2, opt3);
List<String> result = fields.map(o -> o.orElse("")).map(o -> o.toString()).collect(Collectors.toList());
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC5zdHJlYW0uKjsKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCU9wdGlvbmFsPExvbmc+IG9wdDEgPSBPcHRpb25hbC5vZigxM2wpOwoJCU9wdGlvbmFsPFN0cmluZz4gb3B0MiA9IE9wdGlvbmFsLmVtcHR5KCk7CgkJT3B0aW9uYWw8U3RyaW5nPiBvcHQzID0gT3B0aW9uYWwub2YoInNvbWV0aGluZyIpOwoJCQoJCVN0cmVhbTxPcHRpb25hbD4gZmllbGRzID0gU3RyZWFtLm9mKG9wdDEsIG9wdDIsIG9wdDMpOwoJICAgIAlMaXN0PFN0cmluZz4gcmVzdWx0ID0gZmllbGRzLm1hcChvIC0+IG8ub3JFbHNlKCIiKSkubWFwKG8gLT4gby50b1N0cmluZygpKS5jb2xsZWN0KENvbGxlY3RvcnMudG9MaXN0KCkpOwoJICAgIAlTeXN0ZW0ub3V0LnByaW50bG4ocmVzdWx0KTsKCX0KfQ==