37 lines
688 B
Java
37 lines
688 B
Java
|
import java.util.Iterator;
|
||
|
import java.util.LinkedList;
|
||
|
|
||
|
public class HashMap {
|
||
|
LinkedList<HashEntry>[] tab;
|
||
|
Iterator iter;
|
||
|
|
||
|
class HashEntry{
|
||
|
public Object key, value;
|
||
|
}
|
||
|
|
||
|
class MyHashMapIterator implements Iterator{
|
||
|
int i;
|
||
|
|
||
|
public MyHashMapIterator(){
|
||
|
while(i<tab.length){
|
||
|
if(tab[i] == null)
|
||
|
continue;
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean hasNext() {
|
||
|
if(i >= tab.length)
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Object next() {
|
||
|
}
|
||
|
}
|
||
|
public static void main(String[] args) {
|
||
|
|
||
|
}
|
||
|
}
|