Java 类org.apache.commons.collections.iterators.EmptyMapIterator 实例源码

项目:keepass2android    文件:AbstractHashedMap.java   
/**
 * Gets an iterator over the map.
 * Changes made to the iterator affect this map.
 * <p>
 * A MapIterator returns the keys in the map. It also provides convenient
 * methods to get the key and value, and set the value.
 * It avoids the need to create an entrySet/keySet/values object.
 * It also avoids creating the Map.Entry object.
 * 
 * @return the map iterator
 */
public MapIterator mapIterator() {
    if (size == 0) {
        return EmptyMapIterator.INSTANCE;
    }
    return new HashMapIterator(this);
}
项目:KeePass2Android    文件:AbstractHashedMap.java   
/**
 * Gets an iterator over the map.
 * Changes made to the iterator affect this map.
 * <p>
 * A MapIterator returns the keys in the map. It also provides convenient
 * methods to get the key and value, and set the value.
 * It avoids the need to create an entrySet/keySet/values object.
 * It also avoids creating the Map.Entry object.
 * 
 * @return the map iterator
 */
public MapIterator mapIterator() {
    if (size == 0) {
        return EmptyMapIterator.INSTANCE;
    }
    return new HashMapIterator(this);
}