Skip to content

Comments

Added test2.1#56

Open
AntonChern wants to merge 2 commits intomasterfrom
sem2.test2.1
Open

Added test2.1#56
AntonChern wants to merge 2 commits intomasterfrom
sem2.test2.1

Conversation

@AntonChern
Copy link
Owner

No description provided.

* {@inheritDoc}
* */
@Override
public int compare(LinkedList first, LinkedList second) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

параметры-типы у генериков потерялись

if (isEmpty()) {
set.add(list);
} else {
Comparator comparator = new Comparator();
Copy link
Collaborator

Choose a reason for hiding this comment

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

ну почти, да. только бы тогда уж хранить его в поле и не создавать каждый раз. а в идеале -- передавать в конструкторе или сеттере извне, мало ли какой компаратор пользователь захочет

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

Successfully merging this pull request may close these issues.

2 participants