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
Java Code:
private final static Map<String, String> props = new LinkedHashMap<String, String>(); final Set<String> propSet = props.keySet(); StringBuilder newString = new StringBuilder(); for (String prop : propSet) { if (newString.length() > 0) { newString.append("|"); } newString.append(prop); }
On converting this code to scala, get an error on the line, Scala Code
... for (prop <- propSet) { ...
saying foreach does not exist for the class java.util.Set[String]. Had to convert it to Scala set using asScalaSet(propSet) as mentioned in https://alvinalexander.com/scala/how-to-go-from-java-collections-convert-in-scala-interact.
foreach does not exist for the class java.util.Set[String]
asScalaSet(propSet)
Being new to Scala not sure if this is actually a bug to be reported here
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Java Code:
On converting this code to scala, get an error on the line,
Scala Code
saying
foreach does not exist for the class java.util.Set[String]
. Had to convert it to Scala set usingasScalaSet(propSet)
as mentioned in https://alvinalexander.com/scala/how-to-go-from-java-collections-convert-in-scala-interact.Being new to Scala not sure if this is actually a bug to be reported here
The text was updated successfully, but these errors were encountered: