Question: I have a hashmap that is 101 keys in size, but I know for sure about 6 of those have no data inside, and there may be more without data as well. What exactly is inside the empty indexes? Is it null? or is there a Hash(index).isEmpty() method that I can use to see if its empty?

I realize there is a isEmpty method inside hashmap, but I thought that only checked if the entire map was empty not just a single index.

Answer: 
> 
> I realize there is a isEmpty method
>  inside hashmap, but I thought that
>  only checked if the entire map was
>  empty not just a single index.
> 
> 
> 

I think what you're looking for is the [`containsKey(Object)` method](http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/util/Map.html#containsKey%28java.lang.Object%29). According to the documentation:

> 
> Returns `true` if this map contains a
>  mapping for the specified key. More
>  formally, returns `true` if and only if
>  this map contains a mapping for a key
>  `k` such that `(key==null ? k==null :
>  key.equals(k))`. (There can be at most
>  one such mapping.)
> 
> 
> **Parameters:**
> 
> 
> `key` - key whose presence in this map is to be tested
> 
> 
> **Returns:**
> 
> 
> `true` if this map contains a mapping for the specified key
> 
> 
>
Judging from what you said, I'm suspecting something like this:

```
Map<SomeKey, List<SomeValue>> yourMap;

```

If this is the case, what you can do is

```
if( yourMap.contains(someKey) ){
    List<SomeValue> someList = yourMap.get(someKey);
    if(someList.size() == 0){
        // it's empty, do something?
    }
}

```