Код: Выделить всё
private Set object;
public List(Set objects) {
this.object = objects;
}
public Stream getElements() {
Stream stream = object.stream();
return stream;
}
Код: Выделить всё
Set set = new HashSet();
set.add(1);
set.add(2);
List nums = new List(set);
System.out.println(nums.getElements());
Код: Выделить всё
java.util.stream.ReferencePipeline$Head@7cc355be
Подробнее здесь: https://stackoverflow.com/questions/668 ... cts-passed
Мобильная версия