亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? compositeconfiguration.java

?? 解觖java技術(shù)中后臺無法上傳數(shù)給的情況
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package net.myvietnam.mvncore.configuration;
/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *    any, must include the following acknowledgement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgement may appear in the software itself,
 *    if and wherever such third-party acknowledgements normally appear.
 *
 * 4. The names "The Jakarta Project", "Commons", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 */

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.Properties;
import java.util.Vector;

/**
 * This Configuration class allows you to add multiple different types of Configuration
 * to this CompositeConfiguration.  If you add Configuration1, and then Configuration2,
 * any properties shared will mean that Configuration1 will be returned.
 * You can add multiple different types or the same type of properties file.
 * If Configuration1 doesn't have the property, then Configuration2 will be checked.
 *
 * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
 * @version $Id: CompositeConfiguration.java,v 1.2 2004/06/27 01:20:38 skoehler Exp $
 */
public class CompositeConfiguration implements Configuration
{
    /** Array holding all the configuration */
    private LinkedList configList = new LinkedList();

    /**
     * Configuration that holds in memory stuff.  Inserted as first so any
     * setProperty() override anything else added.
     */
    private BaseConfiguration inMemoryConfiguration;

    /**
     * Creates an empty CompositeConfiguration object which can then
     * be added some other Configuration files
     */
    public CompositeConfiguration()
    {
        clear();
    }

    public void addConfiguration(Configuration config)
    {
        if (!configList.contains(config))
        {
            // As the inMemoryConfiguration contains all manually added keys,
            // we must make sure that it is always last. "Normal", non composed
            // configuration add their keys at the end of the configuration and
            // we want to mimic this behaviour.
            configList.add(configList.indexOf(inMemoryConfiguration), config);
        }
    }
    public void removeConfiguration(Configuration config)
    {
        // Make sure that you can't remove the inMemoryConfiguration from
        // the CompositeConfiguration object
        if (!config.equals(inMemoryConfiguration))
        {
            configList.remove(config);
        }
    }
    public int getNumberOfConfigurations()
    {
        return configList.size();
    }
    public void clear()
    {
        configList.clear();
        // recreate the in memory configuration
        inMemoryConfiguration = new BaseConfiguration();
        configList.addLast(inMemoryConfiguration);
    }
    /**
     * CompositeConfigurations can not be added to
     *
     * @param key The Key to add the property to.
     * @param token The Value to add.
     */
    public void addProperty(String key, Object token)
    {
        inMemoryConfiguration.addProperty(key, token);
    }
    /**
     * Get the list of the keys contained in the configuration
     * repository.
     *
     * @return An Iterator.
     */
    public Iterator getKeys()
    {
        List keys = new ArrayList();
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            for (Iterator j = config.getKeys(); j.hasNext();)
            {
                String key = (String) j.next();
                if (!keys.contains(key))
                {
                    keys.add(key);
                }
            }
        }
        return keys.iterator();
    }
    /**
     * Get the list of the keys contained in the configuration
     * repository.
     *
     * @return An Iterator.
     */
    public Iterator getKeys(String key)
    {
        List keys = new ArrayList();
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            for (Iterator j = config.getKeys(key); j.hasNext();)
            {
                String newKey = (String) j.next();
                if (!keys.contains(newKey))
                {
                    keys.add(newKey);
                }
            }
        }
        return keys.iterator();
    }
    /**
     * Get a list of properties associated with the given
     * configuration key.
     *
     * @param key The configuration key.
     * @return The associated properties if key is found.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a String/Vector.
     * @exception IllegalArgumentException if one of the tokens is
     * malformed (does not contain an equals sign).
     */
    public Properties getProperties(String key)
    {
        return getFirstMatchingConfig(key).getProperties(key);
    }
    public boolean isEmpty()
    {
        boolean isEmpty = true;
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            if (!config.isEmpty())
            {
                return false;
            }
        }
        return isEmpty;
    }
    /**
     *  Gets a property from the configuration.
     *
     *  @param key property to retrieve
     *  @return value as object. Will return user value if exists,
     *          if not then default value if exists, otherwise null
     */
    public Object getProperty(String key)
    {
        return getFirstMatchingConfig(key).getProperty(key);
    }
    /**
     * Set a property, this will replace any previously
     * set values. Set values is implicitly a call
     * to clearProperty(key), addProperty(key,value).
     *
     * @param key
     * @param value
     */
    public void setProperty(String key, Object value)
    {
        clearProperty(key);
        addProperty(key, value);
    }
    /**
     * Clear a property in the configuration.
     *
     * @param key the key to remove along with corresponding value.
     */
    public void clearProperty(String key)
    {
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            config.clearProperty(key);
        }
    }
    /**
     * check if the configuration contains the key
     */
    public boolean containsKey(String key)
    {
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            if (config.containsKey(key))
            {
                return true;
            }
        }
        return false;
    }
    /**
     * Create a CompositeConfiguration object that is a subset
     * of this one. Cycles over all the config objects, and calls
     * their subset method and then just adds that.
     *
     * @param prefix
     */
    public Configuration subset(String prefix)
    {
        CompositeConfiguration subsetCompositeConfiguration =
            new CompositeConfiguration();
        Configuration subConf = null;
        int count = 0;
        for (ListIterator i = configList.listIterator(); i.hasNext();)
        {
            Configuration config = (Configuration) i.next();
            Configuration subset = config.subset(prefix);
            if (subset != null)
            {
                subsetCompositeConfiguration.addConfiguration(subset);
                subConf = subset;
                count++;
            }
        }
        return (count == 1) ? subConf : subsetCompositeConfiguration;
    }
    /**
    * Get a float associated with the given configuration key.
    *
    * @ param key The configuration key.
    * @ return The associated float.
    * @ exception NoSuchElementException is thrown if the key doesn 't
    * map to an existing object.
    * @ exception ClassCastException is thrown if the key maps to an
    * object that is not a Float.
    * @ exception NumberFormatException is thrown if the value mapped
    * by the key has not a valid number format.
     */
    public float getFloat(String key)
    {
        return getFirstMatchingConfig(key).getFloat(key);
    }
    /**
     * Get a boolean associated with the given configuration key.
     *
     * @param key The configuration key.
     * @return The associated boolean.
     * @exception NoSuchElementException is thrown if the key doesn't
     * map to an existing object.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a Boolean.
     */
    public boolean getBoolean(String key)
    {
        return getFirstMatchingConfig(key).getBoolean(key);
    }
    /**
     * Get a boolean associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated boolean.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a Boolean.
     */
    public boolean getBoolean(String key, boolean defaultValue)
    {
        return getBoolean(key, new Boolean(defaultValue)).booleanValue();
    }
    /**
     * Get a boolean associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated boolean if key is found and has valid
     * format, default value otherwise.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a Boolean.
     */
    public Boolean getBoolean(String key, Boolean defaultValue)
    {
        try
        {
            return getFirstMatchingConfig(key).getBoolean(key, defaultValue);
        }
        catch (NoSuchElementException nsee)
        {
            return defaultValue;
        }
    }
    /**
     * Get a byte associated with the given configuration key.
     *
     * @param key The configuration key.
     * @return The associated byte.
     * @exception NoSuchElementException is thrown if the key doesn't
     * map to an existing object.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a Byte.
     * @exception NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public byte getByte(String key)
    {
        return getFirstMatchingConfig(key).getByte(key);
    }
    /**
     * Get a byte associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated byte.
     * @exception ClassCastException is thrown if the key maps to an
     * object that is not a Byte.
     * @exception NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public byte getByte(String key, byte defaultValue)
    {
        return getByte(key, new Byte(defaultValue).byteValue());
    }
    /**

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av网站在线观看| 欧美亚洲国产一区在线观看网站 | 韩国精品久久久| 中文字幕av一区二区三区免费看| 欧美高清一级片在线| 99久久伊人网影院| 粉嫩欧美一区二区三区高清影视| 日韩精品欧美成人高清一区二区| 色综合激情五月| 丁香另类激情小说| 国产.欧美.日韩| 国产成人综合亚洲91猫咪| 激情五月激情综合网| 精品一区二区久久久| 激情都市一区二区| 国产一区二区视频在线| 五月婷婷综合网| 亚洲小说春色综合另类电影| 亚洲精品日韩综合观看成人91| 欧美国产日韩精品免费观看| 国产午夜精品福利| 亚洲国产成人午夜在线一区| 国产精品网站在线播放| 综合分类小说区另类春色亚洲小说欧美| 国产精品免费免费| 一区二区在线看| 亚洲成人动漫在线免费观看| 免费观看成人鲁鲁鲁鲁鲁视频| 免费人成黄页网站在线一区二区| 久久综合九色综合97婷婷女人 | 精品国产一区二区精华| 成人免费视频网站在线观看| 91社区在线播放| 欧美丰满嫩嫩电影| 国产欧美va欧美不卡在线| 综合av第一页| 免费成人结看片| 粉嫩蜜臀av国产精品网站| 色老汉一区二区三区| 欧美大肚乱孕交hd孕妇| 中文字幕一区二区三区在线不卡 | 欧美xxxxx裸体时装秀| 亚洲人成精品久久久久久| 老司机免费视频一区二区三区| 国产大片一区二区| 欧美日韩免费一区二区三区视频| 久久精品亚洲一区二区三区浴池 | 国产精品二区一区二区aⅴ污介绍| 色婷婷精品久久二区二区蜜臀av| 日韩色视频在线观看| 亚洲精品福利视频网站| 国产一区二区三区| 日韩欧美在线综合网| 亚洲欧美日韩一区二区| 国产一区二区美女诱惑| 色综合久久中文字幕综合网| 成人福利视频在线看| 精品国产一区二区三区不卡| 国产69精品久久99不卡| 日韩精品中文字幕在线一区| 亚洲制服丝袜一区| 99国产一区二区三精品乱码| 日本一区二区免费在线观看视频| 极品少妇xxxx精品少妇| 欧美日韩成人在线| 午夜精品久久一牛影视| 欧美视频自拍偷拍| 亚洲成人在线免费| 欧美性色欧美a在线播放| 亚洲欧洲韩国日本视频| 99精品国产99久久久久久白柏| 国产精品久久久久久久岛一牛影视| 高清成人在线观看| 综合久久一区二区三区| 色综合久久久久综合体| 樱花草国产18久久久久| 制服丝袜一区二区三区| 精品一区二区三区欧美| 久久综合九色综合欧美98| 国产福利一区二区三区| 中文字幕制服丝袜成人av | 久久久久久久久久电影| 丁香婷婷综合网| 亚洲在线一区二区三区| 麻豆久久久久久| 国产欧美日韩在线视频| 欧洲人成人精品| 国产一区在线视频| 亚洲三级视频在线观看| 91精品国产91久久久久久最新毛片| 国产精品一区二区在线播放| 国产精品视频麻豆| 欧美一区二区三区视频免费播放| 国产高清精品网站| 亚洲chinese男男1069| 国产午夜精品一区二区三区四区| 欧美日韩亚洲另类| 日韩一本二本av| www.66久久| 国产真实精品久久二三区| 亚洲精品写真福利| 国产欧美精品日韩区二区麻豆天美| 色老综合老女人久久久| 国产精品1区2区| 美女视频第一区二区三区免费观看网站| 中文字幕中文字幕在线一区| 91麻豆精品国产91久久久| 97久久超碰国产精品电影| 国产成人精品三级| 麻豆国产一区二区| 日韩av午夜在线观看| 亚洲1区2区3区视频| 日韩精品一区二区三区在线观看| 亚洲乱码日产精品bd| 亚洲日本电影在线| 国产精品久久久久7777按摩| 国产精品视频yy9299一区| 亚洲国产成人午夜在线一区| 国产精品美女久久久久久| 国产亚洲欧美一区在线观看| 2021久久国产精品不只是精品| 在线区一区二视频| 欧美午夜片在线看| 欧美日韩久久久一区| 欧美一区二区私人影院日本| 555www色欧美视频| 日韩久久免费av| 国产视频一区二区在线| 国产精品久久久久久久久免费相片 | 日本一区二区在线不卡| 国产亚洲欧美在线| 一区二区三区国产精华| 亚洲大尺度视频在线观看| 午夜精品福利在线| 韩国av一区二区三区| 成人av手机在线观看| 日本高清不卡视频| 欧美一区二区人人喊爽| 国产亚洲一区字幕| 一区二区日韩电影| 国模冰冰炮一区二区| 成人激情黄色小说| 欧美一个色资源| 国产精品欧美经典| 另类小说一区二区三区| 91影视在线播放| 777xxx欧美| 国产精品久久久久一区二区三区共 | 欧美成人一区二区三区| 国产精品网友自拍| 麻豆精品久久久| 色综合咪咪久久| 久久久久国产精品麻豆ai换脸 | 日韩欧美专区在线| 在线观看www91| 久久美女艺术照精彩视频福利播放 | 日韩av在线播放中文字幕| av资源站一区| 国产三级久久久| 国产成人精品免费| av一区二区三区| 国产午夜亚洲精品不卡| 国产在线乱码一区二区三区| 欧美疯狂性受xxxxx喷水图片| 亚洲色图第一区| 97精品久久久午夜一区二区三区| 欧美videofree性高清杂交| 亚洲国产精品久久久久秋霞影院| 91同城在线观看| 亚洲va在线va天堂| 欧美日韩免费一区二区三区视频| 亚洲美女视频一区| 欧美色综合天天久久综合精品| 日本一区二区三区电影| 99在线精品一区二区三区| 国产亚洲美州欧州综合国| 国产综合久久久久久鬼色 | 日韩三级在线观看| 国模一区二区三区白浆| 国产精品色婷婷久久58| 99re6这里只有精品视频在线观看| 欧美国产日韩a欧美在线观看 | 奇米777欧美一区二区| 欧美成人综合网站| 国产精品一区二区91| 日韩毛片精品高清免费| 在线影院国内精品| 日本欧美一区二区三区乱码| 欧美精品一区视频| 色又黄又爽网站www久久| 免费在线观看不卡| 日韩码欧中文字| 日韩欧美成人午夜| 99精品偷自拍| 日韩精品电影在线观看| 亚洲女同ⅹxx女同tv| 欧美精品aⅴ在线视频| 国产一区二区三区视频在线播放| 亚洲444eee在线观看| 欧美亚洲一区二区三区四区|