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

Added a few methods to the public API of collections #1400

Merged
merged 1 commit into from
Jun 25, 2016
Merged

Added a few methods to the public API of collections #1400

merged 1 commit into from
Jun 25, 2016

Conversation

l0rinc
Copy link
Contributor

@l0rinc l0rinc commented Jun 23, 2016

Fixes #1377

@@ -68,7 +61,7 @@ private Lazy(Supplier<? extends T> supplier) {
* @return the given {@code lazy} instance as narrowed type {@code Lazy<T>}.
*/
@SuppressWarnings("unchecked")
static <T> Lazy<T> narrow(Lazy<? extends T> lazy) {
public static <T> Lazy<T> narrow(Lazy<? extends T> lazy) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no test for this

@codecov-io
Copy link

codecov-io commented Jun 23, 2016

Current coverage is 97.22%

Merging #1400 into master will not change coverage

@@             master      #1400   diff @@
==========================================
  Files            86         86          
  Lines         10282      10282          
  Methods           0          0          
  Messages          0          0          
  Branches       1823       1823          
==========================================
  Hits           9997       9997          
  Misses          157        157          
  Partials        128        128          

Powered by Codecov. Last updated by bf160e7...3bff648

@@ -1841,14 +1840,14 @@ public int lastIndexOf(int ch, int fromIndex) {
* @param fromIndex the index to start the search from.
* @return {@code Some(index)} or {@code None} if not found.
*/
Option<Integer> lastIndexOfOption(int ch, int fromIndex) {
public Option<Integer> lastIndexOfOption(int ch, int fromIndex) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paplorinc

@emmanueltouzery
Copy link
Contributor

regarding the unfold* they were meant to be public. I missed it because I first added them to List and that's an interface, no need for the public there. I should have added the public when implementing it in classes, but I missed it. So yes, it should be made public.

@emmanueltouzery
Copy link
Contributor

emmanueltouzery commented Jun 23, 2016

hmm wait this is static. Maybe the public would be needed also for interfaces like List then? (nope checked it actually no need for public even for static functions of an interface)

@l0rinc
Copy link
Contributor Author

l0rinc commented Jun 23, 2016

So yes, it should be made public

Thanks :)

Maybe the public would be needed also for interfaces like List then

Interface methods can only be public, no need to specify it explicitly.

@danieldietrich
Copy link
Contributor

Very nice! The branch has conflict now. Could you please solve them an I will merge. Thanks!

@l0rinc
Copy link
Contributor Author

l0rinc commented Jun 25, 2016

Done, please recheck!

@danieldietrich
Copy link
Contributor

Great, thank you!

@danieldietrich danieldietrich merged commit 8332775 into vavr-io:master Jun 25, 2016
@l0rinc l0rinc deleted the publicStatic branch June 25, 2016 21:42
@danieldietrich danieldietrich modified the milestones: 2.1.0, 2.0.3 Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants