Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

389
Views
Convertidor automático de Java a Kotlin: ¿Cómo convertir automáticamente Streams a funciones de Kotlin?

Con IntelliJ IDEA, puedo convertir automáticamente código Java a código Kotlin. Sin embargo, cuando el código Java usa cosas como Stream , solo se convierte a la gramática de Kotlin, pero aún usa Stream. Pero sabemos que la API de secuencias/colecciones de Kotlin es mucho, mucho más simple que la API Stream de Java, por lo que agradecería si pudiera convertir automáticamente Stream a la API de Kotlin.

Por ejemplo,

 myList.stream().map(x -> x + 1).collect(Collectors.toList()); // java

Cómo convertir automáticamente a:

 myList.map { it + 1 } // kotlin

(Observe que el .map aquí funciona en Iterable, y ya no hay stream() ni collect() ).

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Aquí está la solicitud de función para eso en el rastreador de errores del complemento Kotlin: https://youtrack.jetbrains.com/issue/KTIJ-14393

Siéntete libre de votar y seguir.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!