Skip to content

Commit 1d970e3

Browse files
committed
👌 Updating code due to code review changes.
1 parent d02ce84 commit 1d970e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/crossoverjie/actual/AbstractMap.java renamed to src/main/java/com/crossoverjie/actual/LRUAbstractMap.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
* Date: 02/02/2018 20:47
2525
* @since JDK 1.8
2626
*/
27-
public class AbstractMap extends java.util.AbstractMap {
27+
public class LRUAbstractMap extends java.util.AbstractMap {
2828

29-
private final static Logger LOGGER = LoggerFactory.getLogger(AbstractMap.class);
29+
private final static Logger LOGGER = LoggerFactory.getLogger(LRUAbstractMap.class);
3030

3131
/**
3232
* 检查是否超期线程
@@ -74,7 +74,7 @@ public class AbstractMap extends java.util.AbstractMap {
7474
private volatile AtomicInteger size ;
7575

7676

77-
public AbstractMap() {
77+
public LRUAbstractMap() {
7878

7979

8080
arraySize = DEFAULT_ARRAY_SIZE;
@@ -310,7 +310,7 @@ public String toString() {
310310

311311

312312
/**
313-
* 摘抄自 HashMap 的 hash 实现
313+
* copy HashMap 的 hash 实现
314314
* @param key
315315
* @return
316316
*/

src/test/java/com/crossoverjie/actual/AbstractMapTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class AbstractMapTest {
1010

1111
@Test
1212
public void test(){
13-
AbstractMap map = new AbstractMap() ;
13+
LRUAbstractMap map = new LRUAbstractMap() ;
1414
map.put(1,1) ;
1515
map.put(2,2) ;
1616

@@ -22,7 +22,7 @@ public void test(){
2222
}
2323

2424
public static void main(String[] args) {
25-
AbstractMap map = new AbstractMap() ;
25+
LRUAbstractMap map = new LRUAbstractMap() ;
2626
map.put(1,1) ;
2727
map.put(2,2) ;
2828

0 commit comments

Comments
 (0)