Registry / utility / scala-java8-compat-3

scala-java8-compat-3

JSON →
library1.0.2javamavenunverified

Compatibility library for using Java 8 features (e.g., streams, Optionals) with Scala 3 collections and functional constructs.

<dependency> <groupId>org.scala-lang.modules</groupId> <artifactId>scala-java8-compat_3</artifactId> <version>1.0.2</version> </dependency>
INSTALL
IMPORT
SIG · SCALA-JAVA8-COMPAT
S
scala-java8-compat-3
utilityjavav1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OptionConverters
✓ scala.compat.java8.OptionConverters

Convert a Java Optional to a Scala Option using OptionConverters.

import scala.compat.java8.OptionConverters; public class Main { public static void main(String[] args) { java.util.Optional<String> javaOpt = java.util.Optional.of("hello"); scala.Option<String> scalaOpt = OptionConverters.toScala(javaOpt); System.out.println(scalaOpt.get()); } }
Debug
Known issues
breakingThis library is for Scala 3; using with Scala 2 may cause compatibility issues.
fix
Use scala-java8-compat_2.13 or _2.12 for Scala 2 projects.
affects: >=1.0.0
Upgrade
Version history
1.0.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources