Skip to content
New issue

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

org.cactoos.map.IterableAsMap #116

Closed
yegor256 opened this issue Jun 13, 2017 · 6 comments
Closed

org.cactoos.map.IterableAsMap #116

yegor256 opened this issue Jun 13, 2017 · 6 comments

Comments

@yegor256
Copy link
Owner

Let's create a new package and class.

@Timmeey
Copy link
Contributor

Timmeey commented Jun 13, 2017

@yegor256 like this?

public final class IterableAsMap<X,Y,Z>{
  private final Iterable<X> iterable;
  private final Func<X,Set<Y,Z>> mapping;
  public IterableAsMap(Iterable<X> iterable, Func<X,Set<Y,Z>> func){}

@yegor256
Copy link
Owner Author

@Timmeey like this:

        MatcherAssert.assertThat(
            "Can't convert iterable to map",
            new IterableAsMap<>(
                new AbstractMap.SimpleEntry<>(0, "hello, "),
                new AbstractMap.SimpleEntry<>(1, "world!")
            ),
            Matchers.hasEntry(
                Matchers.equalTo(0),
                Matchers.startsWith("hello")
            )
        );

I'm working on it now...

yegor256 added a commit that referenced this issue Jun 13, 2017
@yegor256
Copy link
Owner Author

fixed in #118

yegor256 added a commit that referenced this issue Jun 13, 2017
@yegor256
Copy link
Owner Author

@rultor release, tag is 0.4

@rultor
Copy link
Collaborator

rultor commented Jun 13, 2017

@rultor release, tag is 0.4

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Jun 13, 2017

@rultor release, tag is 0.4

@yegor256 Done! FYI, the full log is here (took me 15min)

vivekimsit added a commit to vivekimsit/cactoos that referenced this issue Jun 14, 2017
* upstream/master:
  yegor256#123: fixed
  yegor256#123: bug
  yegor256#121: fixed
  yegor256#121: bug
  doc
  doc
  blog
  names
  yegor256#116 package removed
  yegor256#119: StickyScalar fixed
  yegor256#116: IterableAsMap
  Switched to non Cached size
  Refactored IterableAsList to remove unnecessary call to size() and remove not working cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants