스트림
-
스트림 생성 (collection , 배열)JAVA/스트림, 컬렉션 프레임워크, 람다 2024. 6. 13. 10:46
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 ✔스트림 소개단어의 뜻은 '흐름'이다. 어떤 데이터의 흐름으로 유추해 볼 수 있다. 자바 8버전부터 추가된 컬렉션 요소를 하나씩 참조해서 람다식(함수적 인터페이스)으로 처리할 수 있도록 해주는 반복자를 의미한다.스트림 인터페이스는 컬렉션, 배열.. 등의 저장 요소를 하나씩 참조하여 인터페이스(람다식)을 적용하며 반복 처리가 가능하게 한다.반복자 역할을 한다.(internal iteration 내부 반복을 이용)정렬, 집계, 빅데이터 처리 등도 가능하다.1회용이기에 람다식과 많이 사용한다.내부 반복으로 작업 처리를 진행하며 원본 데이터를 변경하지 않는다.새로운 요소를 추가하는 것은 불가능하다.기존 요소 삭제는 불가능하다.무..