StringTable () { long count = getMembers().stream().filter(bin -> bin instanceof StringTable).count(); if (count > 1) { throw new IllegalStateException("More than one StringTable found, indicates that there's more than one lanugage in executable"); } Optional<Bin> optional = getMembers().stream().filter(bin -> bin instanceof StringTable).findFirst(); if (optional.isEmpty()) { throw new IllegalStateException("No StringTable's found"); } return (StringTable)optional.get(); }