question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot iterate over JavaUtilMap in Swift: 'JavaUtilSet' does not have a member named 'Generator'

See original GitHub issue

Having the following Map:

let params: JavaUtilMap = // defined

I tried this:

for entry in params.entrySet() {

      }

But it leads to the following error:

 'JavaUtilSet' does not have a member named 'Generator'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
confilecommented, May 3, 2015

Well I guess it is the following way, but it is not very easy:

      let params: JavaUtilMap = // defined
      let entrySet:JavaUtilSet = params.entrySet()
      let iteratory:JavaUtilIterator = entrySet.iterator()
      while iteratory.hasNext() {
        let entry:JavaUtilMap_Entry = iteratory.next() as! JavaUtilMap_Entry
      }
0reactions
confilecommented, May 6, 2015
Read more comments on GitHub >

github_iconTop Results From Across the Web

Loop through [AnyObject]? results in does not have a member ...
This code is giving me an error telling me that it does not have a member named generator. for screen in NSScreen.screens() {...
Read more >
Java features should be preferred to Guava
When migrating an application to Java 8 or even when starting a new one, it's recommended to prefer Java 8 APIs over Guava...
Read more >
TurbineGenerator.java - Full-Time Faculty
* Map (function, variable) to debug symbol. * Function is "" if not inside scope of function. */
Read more >
Using Formal Methods to Verify Transactional Abstract ...
ing the burden on the programmer with a proof requirement does not simplify the task of ... tion to the problem of specifying...
Read more >
Sequence | Apple Developer Documentation
The most common way to iterate over the elements of a sequence is to use a for ... The Sequence protocol makes no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found