Java02. ДЗ 01, Лобанов Артём#4
Open
ArtyomLobanov wants to merge 4 commits into
Open
Conversation
sproshev
suggested changes
Sep 27, 2016
| @@ -0,0 +1,136 @@ | |||
| package ru.spbau.lobanov.collections; | |||
There was a problem hiding this comment.
эти файлы лежат не там, где надо. Если открывать идеей build.gradle, то они вполне справедливо не подхватываются
sproshev
approved these changes
Sep 30, 2016
| @@ -0,0 +1 @@ | |||
| #Mon Sep 19 21:18:32 MSK 2016 | |||
| Entry(K key, V value) { | ||
| this.key = key; | ||
| this.value = value; | ||
| this.hash = key.hashCode(); |
| size++; | ||
| } | ||
|
|
||
| private int getIndex(int hash) { |
There was a problem hiding this comment.
getIndex везде используется вместе с таблицей, может как раз table[getIndex(...)] выделить в метод?
| @@ -0,0 +1,92 @@ | |||
| package ru.spbau.lobanov.collections; | |||
|
|
|||
| public class MyLinkedList<E> { // implements Iterable<E>, is Iterable a part of std lib? | |||
There was a problem hiding this comment.
часть, но т.к. он за тебя ничего не делает, то отнаследоваться можно было
| private boolean equals(E first, E second) { | ||
| if (first == null) | ||
| return second == null; | ||
| return first.equals(second); |
| map.clear(); | ||
| assertEquals(0, map.size()); | ||
| for (int i = 0; i < 512; i ++) { | ||
| assertSame(null, map.get("key" + i)); |
| assertSame(null, map.get("key" + i)); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
не вся функциональность таблицы проверятся, см. изначальные комменты
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Первое дз про MyHashMap