@ file : Jvm Name (" Streams Kt ") Ċ package Ġkotlin . streams Ċ Ċ import Ġjava . util .* Ċ import Ġjava . util . stream .* Ċ Ċ /** Ċ Ġ* ĠCreates Ġa Ġ[ Sequence ] Ġinstance Ġthat Ġwraps Ġthe Ġoriginal Ġstream Ġiter ating Ġthrough Ġits Ġelements . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun Ġ< T > ĠStream < T >. as Sequence (): ĠSequence < T > Ġ= ĠSequence Ġ{ Ġiterator () Ġ} Ċ Ċ /** Ċ Ġ* ĠCreates Ġa Ġ[ Sequence ] Ġinstance Ġthat Ġwraps Ġthe Ġoriginal Ġstream Ġiter ating Ġthrough Ġits Ġelements . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun ĠInt Stream . as Sequence (): ĠSequence < Int > Ġ= ĠSequence Ġ{ Ġiterator () Ġ} Ċ Ċ /** Ċ Ġ* ĠCreates Ġa Ġ[ Sequence ] Ġinstance Ġthat Ġwraps Ġthe Ġoriginal Ġstream Ġiter ating Ġthrough Ġits Ġelements . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun ĠLong Stream . as Sequence (): ĠSequence < Long > Ġ= ĠSequence Ġ{ Ġiterator () Ġ} Ċ Ċ /** Ċ Ġ* ĠCreates Ġa Ġ[ Sequence ] Ġinstance Ġthat Ġwraps Ġthe Ġoriginal Ġstream Ġiter ating Ġthrough Ġits Ġelements . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun ĠDouble Stream . as Sequence (): ĠSequence < Double > Ġ= ĠSequence Ġ{ Ġiterator () Ġ} Ċ Ċ /** Ċ Ġ* ĠCreates Ġa Ġsequential Ġ[ Stream ] Ġinstance Ġthat Ġproduces Ġelements Ġfrom Ġthe Ġoriginal Ġsequence . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun Ġ< T > ĠSequence < T >. as Stream (): ĠStream < T > Ġ= ĠStream Support . stream ({ ĠSpl iter ators . spl iterator Unknown Size ( iterator (), ĠSpl iterator . ORDER ED ) Ġ}, ĠSpl iterator . ORDER ED , Ġfalse ) Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ List ] Ġcontaining Ġall Ġelements Ġproduced Ġby Ġthis Ġstream . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun Ġ< T > ĠStream < T >. toList (): ĠList < T > Ġ= Ġcollect ( Collectors . toList < T >()) Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ List ] Ġcontaining Ġall Ġelements Ġproduced Ġby Ġthis Ġstream . Ċ Ġ*/ Ċ public Ġfun ĠInt Stream . toList (): ĠList < Int > Ġ= Ġto Array (). asList () Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ List ] Ġcontaining Ġall Ġelements Ġproduced Ġby Ġthis Ġstream . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun ĠLong Stream . toList (): ĠList < Long > Ġ= Ġto Array (). asList () Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ List ] Ġcontaining Ġall Ġelements Ġproduced Ġby Ġthis Ġstream . Ċ Ġ*/ Ċ @ Since Kotlin (" 1 . 1 ") Ċ public Ġfun ĠDouble Stream . toList (): ĠList < Double > Ġ= Ġto Array (). asList () ĊĊ