{"action":"created","issue":{"url":"https://api.github.com/repos/jMetal/jMetal/issues/173","repository_url":"https://api.github.com/repos/jMetal/jMetal","labels_url":"https://api.github.com/repos/jMetal/jMetal/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/jMetal/jMetal/issues/173/comments","events_url":"https://api.github.com/repos/jMetal/jMetal/issues/173/events","html_url":"https://github.com/jMetal/jMetal/issues/173","id":189531894,"number":173,"title":"Refactor the add() method in class NonDominatedSolutionListArchive","user":{"login":"ajnebro","id":1889196,"avatar_url":"https://avatars.githubusercontent.com/u/1889196?v=3","gravatar_id":"","url":"https://api.github.com/users/ajnebro","html_url":"https://github.com/ajnebro","followers_url":"https://api.github.com/users/ajnebro/followers","following_url":"https://api.github.com/users/ajnebro/following{/other_user}","gists_url":"https://api.github.com/users/ajnebro/gists{/gist_id}","starred_url":"https://api.github.com/users/ajnebro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajnebro/subscriptions","organizations_url":"https://api.github.com/users/ajnebro/orgs","repos_url":"https://api.github.com/users/ajnebro/repos","events_url":"https://api.github.com/users/ajnebro/events{/privacy}","received_events_url":"https://api.github.com/users/ajnebro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-11-15T22:59:07Z","updated_at":"2016-11-16T18:47:28Z","closed_at":null,"body":"I would suggest to make a first try with Java 8 applying lambdas to the add() method of class [NonDominatedSolutionListArchive](https://github.com/jMetal/jMetal/blob/master/jmetal-core/src/main/java/org/uma/jmetal/util/archive/impl/NonDominatedSolutionListArchive.java).\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/jMetal/jMetal/issues/comments/261035067","html_url":"https://github.com/jMetal/jMetal/issues/173#issuecomment-261035067","issue_url":"https://api.github.com/repos/jMetal/jMetal/issues/173","id":261035067,"user":{"login":"matthieu-vergne","id":1774210,"avatar_url":"https://avatars.githubusercontent.com/u/1774210?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieu-vergne","html_url":"https://github.com/matthieu-vergne","followers_url":"https://api.github.com/users/matthieu-vergne/followers","following_url":"https://api.github.com/users/matthieu-vergne/following{/other_user}","gists_url":"https://api.github.com/users/matthieu-vergne/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieu-vergne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieu-vergne/subscriptions","organizations_url":"https://api.github.com/users/matthieu-vergne/orgs","repos_url":"https://api.github.com/users/matthieu-vergne/repos","events_url":"https://api.github.com/users/matthieu-vergne/events{/privacy}","received_events_url":"https://api.github.com/users/matthieu-vergne/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T18:47:28Z","updated_at":"2016-11-16T18:47:28Z","body":"> Isn't it true that if the incoming solution S1 is dominated by a solution S2 already in the list, then all solutions dominated by S2 have already been removed, and so all solutions dominated by S1 too?\r\n\r\nWhat about this one? Is it wrong? If it is correct, then you can also move the `foundSolution` step at the beginning and remerge it with `solutionIsInTheArchive`.\r\n\r\n> I'm not sure if filter is the best choice\r\n\r\nWhat do you dislike with filter? Given that you want to filter out the dominated ones, I don't see why you would expect something else.\r\n\r\n> I don't like the `if (solutionIsInTheArchive == null)` comparison\r\n\r\nInstead of `findFirst(predicate).orElse(null)` you can use `anyMatch(predicate)` which returns a boolean.\r\nhttp://www.leveluplunch.com/java/examples/java-util-stream-find-match-example/"}}
{"actor":{"display_login":"matthieu-vergne"}}