Notice
Recent Posts
Recent Comments
반응형
목록2018/02/01 (2)
오늘도 공부
[RxKotlin] Collection 함수 기본 알아보기
Collection 함수들RxJava에서 자주 쓰이는 함수중 하나인 Collection형태를 알아보자.우선 toList() 이다.여러개의 배출을 하나의 리스트로 만들어주는 것이다. 주의점은 리턴값이 Single 인것을 유념하자.아주 간단한 예제를 보자.ToListfun testToList(){ Observable.just("Alpha" , "Beta" , "Gamma" , "Delta" , "Epslion") .toList() //Single로 배출 .subscribeBy( onSuccess = { println(it) } ) } ==================================== [Alpha, Beta, Gamma, Delta, Epslion] 정렬을 원할땐 ToSortedList를 사용..
스터디/RxJava2
2018. 2. 1. 10:45
