We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit(1)
findFirst()
출처는 없습니다.
findFirst() 는 filter 조건에 일치하는 element 1개를 Optional로 리턴하는 함수입니다.
그런데 제가 생각하기에는 limit(1) 과 역할의 차이가 있는지 궁금합니다.
물론 findFirst()는 Optional로 리턴하기 때문에 null 오류를 방지할 수 있는 이점이 있지만 limit(1) 에서도 충분히 개발자가 빈 array에 관한 예외는 처리할 수 있다고 생각합니다.
제가 알지 못하는 둘의 차이점이 있을까요?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
출처
출처는 없습니다.
질문
findFirst()
는 filter 조건에 일치하는 element 1개를 Optional로 리턴하는 함수입니다.그런데 제가 생각하기에는
limit(1)
과 역할의 차이가 있는지 궁금합니다.물론
findFirst()
는 Optional로 리턴하기 때문에 null 오류를 방지할 수 있는 이점이 있지만limit(1)
에서도 충분히 개발자가 빈 array에 관한 예외는 처리할 수 있다고 생각합니다.제가 알지 못하는 둘의 차이점이 있을까요?
The text was updated successfully, but these errors were encountered: