Stream<InlayUpdateInfo> (int index) { List<InlayUpdateInfo> result = new ArrayList<>(); if (index > 0) { result.add(myUpdateList.get(index - 1)); } if (index + 1 < myUpdateList.size()) { result.add(myUpdateList.get(index + 1)); } return result.stream(); }