forked from sevntu-checkstyle/sevntu.checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map Iteration In For Each Loop Check sevntu-checkstyle#195 Compilable…
… UT input
- Loading branch information
1 parent
5a26697
commit 2f40da0
Showing
5 changed files
with
127 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
100 changes: 100 additions & 0 deletions
100
sevntu-checks/src/test/java/com/github/sevntu/checkstyle/checks/coding/MyMap.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.github.sevntu.checkstyle.checks.coding; | ||
import java.util.Collection; | ||
import java.util.Map; | ||
import java.util.Iterator; | ||
import java.util.Set; | ||
|
||
public class MyMap<K, V> implements Iterable, Map | ||
{ | ||
|
||
|
||
@Override | ||
public Iterator iterator() | ||
{ | ||
return null; | ||
} | ||
public static class Entry<K, V> { | ||
|
||
public String getValue() | ||
{ | ||
return null; | ||
} | ||
|
||
public char[] getKey() | ||
{ | ||
return null; | ||
} | ||
|
||
} | ||
@Override | ||
public int size() | ||
{ | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean isEmpty() | ||
{ | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean containsKey(Object key) | ||
{ | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean containsValue(Object value) | ||
{ | ||
return false; | ||
} | ||
|
||
@Override | ||
public Object get(Object key) | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public Object put(Object key, Object value) | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public Object remove(Object key) | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public void putAll(Map m) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void clear() | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public Set keySet() | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public Collection values() | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public Set<MyMap.Entry<K, V>> entrySet() | ||
{ | ||
return null; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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