⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comboreadmap.java

📁 欢迎使用 FastJsp 开发框架! 编译说明: * 若要生成Api Javadoc文档
💻 JAVA
字号:
package com.onetsoft.fastjsp;


import java.util.Set;
import java.util.Map;
import java.util.Collection;

class ComboReadMap implements Map {
    Map[] a = null;
    int len=0;
    public ComboReadMap(Map[] a) {
        this.a = a;
        this.len=a.length;
    }

    public int size() {
        int count = 0;
        for (int i = 0; i < len; i++) {
            count += a[i].size();
        }
        return count;
    }

    public void clear() {
        throw new UnsupportedOperationException();
    }

    public boolean isEmpty() {
        return size() == 0;
    }

    public boolean containsKey(Object key) {
        for (int i = 0; i <len; i++) {
            if (a[i].containsKey(key)) return true;
        }
        return false;
    }

    public boolean containsValue(Object value) {
        for (int i = 0; i < len; i++) {
            if (a[i].containsValue(value)) return true;
        }
        return false;
    }

    public Object get(Object key) { 
        for (int i = 0; i < len; i++) {
            Object o = a[i].get(key);
            if (o != null) return o;
        }
        return null;
    }

    public Collection values() {
        throw new UnsupportedOperationException();
    }

    public void putAll(Map t) {
        throw new UnsupportedOperationException();
    }

    public Set entrySet() {
        throw new UnsupportedOperationException();
    }

    public Set keySet() {
        throw new UnsupportedOperationException();
    }

    public Object remove(Object key) {
        throw new UnsupportedOperationException();
    }

    public Object put(Object key, Object value) {
        throw new UnsupportedOperationException();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -