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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? configurationkey.java

?? 解觖java技術中后臺無法上傳數給的情況
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package net.myvietnam.mvncore.configuration;

/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2002 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 acknowlegement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowlegement may appear in the software itself,
 *    if and wherever such third-party acknowlegements 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 Group.
 *
 * 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.io.Serializable;
import java.util.Iterator;
import java.util.NoSuchElementException;

/**
 * <p>A simple class that supports creation of and iteration on complex
 * configuration keys.</p>
 * <p>For key creation the class works similar to a StringBuffer: There are
 * several <code>appendXXXX()</code> methods with which single parts
 * of a key can be constructed. All these methods return a reference to the
 * actual object so they can be written in a chain. When using this methods
 * the exact syntax for keys need not be known.</p>
 * <p>This class also defines a specialized iterator for configuration keys.
 * With such an iterator a key can be tokenized into its single parts. For
 * each part it can be checked whether it has an associated index.</p>
 *
 * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
 * @version $Id: ConfigurationKey.java,v 1.2 2004/10/10 16:51:13 minhnn Exp $
 */
public class ConfigurationKey implements Serializable
{
    /** Constant for an attribute start marker.*/
    private static final String ATTRIBUTE_START = "[@";

    /** Constant for an attribute end marker.*/
    private static final String ATTRIBUTE_END = "]";

    /** Constant for a property delimiter.*/
    private static final char PROPERTY_DELIMITER = '.';

    /** Constant for an index start marker.*/
    private static final char INDEX_START = '(';

    /** Constant for an index end marker.*/
    private static final char INDEX_END = ')';

    /** Constant for the initial StringBuffer size.*/
    private static final int INITIAL_SIZE = 32;

    /** Holds a buffer with the so far created key.*/
    private StringBuffer keyBuffer;

    /**
     * Creates a new, empty instance of <code>ConfigurationKey</code>.
     */
    public ConfigurationKey()
    {
        keyBuffer = new StringBuffer(INITIAL_SIZE);
    }

    /**
     * Creates a new instance of <code>ConfigurationKey</code> and
     * initializes it with the given key.
     * @param key the key as a string
     */
    public ConfigurationKey(String key)
    {
        keyBuffer = new StringBuffer(key);
        removeTrailingDelimiter();
    }

    /**
     * Appends the name of a property to this key. If necessary, a
     * property delimiter will be added.
     * @param property the name of the property to be added
     * @return a reference to this object
     */
    public ConfigurationKey append(String property)
    {
        if(keyBuffer.length() > 0 && !hasDelimiter()
        && !isAttributeKey(property))
        {
            keyBuffer.append(PROPERTY_DELIMITER);
        }  /* if */

        keyBuffer.append(property);
        removeTrailingDelimiter();
        return this;
    }

    /**
     * Appends an index to this configuration key.
     * @param index the index to be appended
     * @return a reference to this object
     */
    public ConfigurationKey appendIndex(int index)
    {
        keyBuffer.append(INDEX_START).append(index);
        keyBuffer.append(INDEX_END);
        return this;
    }

    /**
     * Appends an attribute to this configuration key.
     * @param attr the name of the attribute to be appended
     * @return a reference to this object
     */
    public ConfigurationKey appendAttribute(String attr)
    {
        keyBuffer.append(constructAttributeKey(attr));
        return this;
    }

    /**
     * Checks if the passed in key is an attribute key. Such attribute keys
     * start and end with certain marker strings. In some cases they must be
     * treated slightly different.
     * @param key the key (part) to be checked
     * @return a flag if this key is an attribute key
     */
    public static boolean isAttributeKey(String key)
    {
        return key != null
        && key.startsWith(ATTRIBUTE_START)
        && key.endsWith(ATTRIBUTE_END);
    }

    /**
     * Decorates the given key so that it represents an attribute. Adds
     * special start and end markers.
     * @param key the key to be decorated
     * @return the decorated attribute key
     */
    public static String constructAttributeKey(String key)
    {
        StringBuffer buf = new StringBuffer();
        buf.append(ATTRIBUTE_START).append(key).append(ATTRIBUTE_END);
        return buf.toString();
    }

    /**
     * Extracts the name of the attribute from the given attribute key.
     * This method removes the attribute markers - if any - from the
     * specified key.
     * @param key the attribute key
     * @return the name of the corresponding attribute
     */
    public static String attributeName(String key)
    {
        return (isAttributeKey(key)) ?
        removeAttributeMarkers(key) : key;
    }

    /**
     * Helper method for removing attribute markers from a key.
     * @param key the key
     * @return the key with removed attribute markers
     */
    private static String removeAttributeMarkers(String key)
    {
        return key.substring(ATTRIBUTE_START.length(),
        key.length() - ATTRIBUTE_END.length());
    }

    /**
     * Helper method that checks if the actual buffer ends with a property
     * delimiter.
     * @return a flag if there is a trailing delimiter
     */
    private boolean hasDelimiter()
    {
        return keyBuffer.length() > 0
        && keyBuffer.charAt(keyBuffer.length()-1) == PROPERTY_DELIMITER;
    }

    /**
     * Removes a trailing delimiter if there is any.
     */
    private void removeTrailingDelimiter()
    {
        while(hasDelimiter())
        {
            keyBuffer.deleteCharAt(keyBuffer.length()-1);
        }  /* while */
    }

    /**
     * Returns a string representation of this object. This is the
     * configuration key as a plain string.
     * @return a string for this object
     */
    public String toString()
    {
        return keyBuffer.toString();
    }

    /**
     * Returns an iterator for iterating over the single components of
     * this configuration key.
     * @return an iterator for this key
     */
    public KeyIterator iterator()
    {
        return new KeyIterator();
    }

    /**
     * Returns the actual length of this configuration key.
     * @return the length of this key
     */
    public int length()
    {
        return keyBuffer.length();
    }

    /**
     * Sets the new length of this configuration key. With this method it is
     * possible to truncate the key, e.g. to return to a state prior calling
     * some <code>append()</code> methods. The semantic is the same as
     * the <code>setLength()</code> method of <code>StringBuffer</code>.
     * @param len the new length of the key
     */
    public void setLength(int len)
    {
        keyBuffer.setLength(len);
    }

    /**
     * Checks if two <code>ConfigurationKey</code> objects are equal. The
     * method can be called with strings or other objects, too.
     * @param c the object to compare
     * @return a flag if both objects are equal
     */
    public boolean equals(Object c)
    {
        if(c == null)
        {
            return false;
        }  /* if */

        return keyBuffer.toString().equals(c.toString());
    }

    /**
     * Returns the hash code for this object.
     * @return the hash code
     */
    public int hashCode()
    {
        return keyBuffer.hashCode();
    }

    /**
     * Returns a configuration key object that is initialized with the part
     * of the key that is common to this key and the passed in key.
     * @param other the other key
     * @return a key object with the common key part
     */
    public ConfigurationKey commonKey(ConfigurationKey other)
    {
        if(other == null)
        {
            throw new IllegalArgumentException("Other key must no be null!");
        }  /* if */

        ConfigurationKey result = new ConfigurationKey();
        KeyIterator it1 = iterator();
        KeyIterator it2 = other.iterator();

        while(it1.hasNext() && it2.hasNext()
        && partsEqual(it1, it2))
        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品高清视频| 成人性生交大片免费看视频在线| 亚洲线精品一区二区三区八戒| 国产一区二区免费在线| 99国产欧美另类久久久精品| 亚洲欧洲日韩综合一区二区| 播五月开心婷婷综合| 欧美这里有精品| 欧美影院午夜播放| 樱花影视一区二区| 国产成人av电影| 国产大陆亚洲精品国产| 久久国产尿小便嘘嘘尿| 久久99精品久久久久| 欧美xxxx老人做受| 精品福利一区二区三区 | 丝袜美腿亚洲色图| 成人网在线播放| 欧美日韩国产综合久久| 中文字幕欧美激情| 亚洲欧美另类小说| av在线不卡网| 性做久久久久久免费观看| 欧美精品高清视频| 国产成人精品免费网站| 亚洲视频一区二区在线观看| 精品国产三级电影在线观看| 91亚洲大成网污www| 亚洲免费观看高清完整版在线观看 | 国产成人福利片| 日韩二区三区在线观看| 国产女人18水真多18精品一级做| 一区二区三区蜜桃| 成人美女在线观看| 三级欧美韩日大片在线看| 亚洲人妖av一区二区| 久久精品国产一区二区三 | 欧美日韩mp4| 国产成人啪免费观看软件| 亚洲已满18点击进入久久| 亚洲免费视频中文字幕| 国产精品视频免费| 国产精品高潮呻吟久久| 日本一区中文字幕| 一本大道久久a久久精品综合| 日韩欧美高清在线| 亚洲欧美视频在线观看视频| 久久99久久久欧美国产| 欧美精品成人一区二区三区四区| 国产精品免费视频网站| 日本欧美一区二区三区| 欧美一级二级在线观看| 精品视频一区 二区 三区| 国产成人亚洲综合a∨猫咪| 奇米四色…亚洲| 丝袜脚交一区二区| 日韩电影在线看| 欧美mv日韩mv| 欧美放荡的少妇| 欧美一卡2卡3卡4卡| 国产一区二区三区综合| 日韩成人免费在线| 热久久国产精品| 一区二区三国产精华液| 国产精品一色哟哟哟| 精品国产欧美一区二区| 国产综合色视频| 国产亚洲欧美色| 国产成人在线视频网址| 国产色婷婷亚洲99精品小说| 国产欧美日韩不卡| zzijzzij亚洲日本少妇熟睡| 91精品国产乱| caoporm超碰国产精品| 成人精品小蝌蚪| 555www色欧美视频| 91老司机福利 在线| 91美女片黄在线观看| 91麻豆精品国产无毒不卡在线观看| 欧美日韩精品专区| 久久人人爽人人爽| 一区二区三区四区激情| 精品综合久久久久久8888| 国产美女一区二区三区| 欧美色老头old∨ideo| 成人午夜激情片| 成人一级黄色片| 欧美精品一卡两卡| 欧美一卡二卡在线观看| 国产自产v一区二区三区c| 综合自拍亚洲综合图不卡区| 欧美日韩精品免费| 91玉足脚交白嫩脚丫在线播放| 日韩和欧美一区二区三区| 中文字幕成人av| 日韩久久久久久| 亚洲麻豆国产自偷在线| 国产精品免费人成网站| 精品av久久707| 亚洲福利一区二区三区| 91免费版pro下载短视频| 国产精品乱码一区二区三区软件| 午夜精品一区二区三区免费视频| 亚洲综合在线免费观看| 欧美亚洲图片小说| 日韩码欧中文字| 在线欧美一区二区| 亚洲成人精品影院| 欧美日韩一区二区电影| 亚洲成国产人片在线观看| 精品视频一区二区三区免费| 亚洲国产中文字幕在线视频综合 | av高清久久久| 玖玖九九国产精品| 日韩电影免费一区| 日韩avvvv在线播放| 天天综合色天天| 久久国产尿小便嘘嘘尿| 日本aⅴ亚洲精品中文乱码| 欧美中文字幕不卡| 91美女福利视频| 久久综合九色综合欧美就去吻| 激情小说亚洲一区| 国产精品毛片久久久久久| heyzo一本久久综合| 亚洲精品日韩一| 欧美日韩1区2区| 不卡视频一二三四| 欧美经典三级视频一区二区三区| 九九精品视频在线看| 亚洲综合网站在线观看| 国产亚洲污的网站| 久久精品国产亚洲高清剧情介绍 | 色中色一区二区| 色婷婷综合久色| 日韩一区二区影院| 中文文精品字幕一区二区| 亚洲精品视频自拍| 国产精品中文字幕一区二区三区| 成人精品小蝌蚪| 欧美丰满少妇xxxxx高潮对白 | 黑人精品欧美一区二区蜜桃| 国产精品久久网站| 亚洲欧洲精品一区二区三区| 色婷婷综合久色| 婷婷成人激情在线网| 亚洲色图欧美激情| 久久精品人人做人人综合| 欧美日韩在线亚洲一区蜜芽| 国产91精品精华液一区二区三区 | 欧美美女黄视频| 国产黄色91视频| 奇米精品一区二区三区在线观看| 欧美日韩国产一级片| 日韩精品一区二区三区视频在线观看| 亚洲精品自拍动漫在线| 久久99精品久久久久久国产越南 | 欧美不卡一区二区| 视频一区欧美日韩| 91在线精品一区二区三区| 欧美电影免费观看高清完整版在线| 欧美性三三影院| 亚洲日本在线a| 99精品国产99久久久久久白柏| 亚洲与欧洲av电影| 亚洲成人av资源| 日韩av高清在线观看| 国产一区二区三区电影在线观看| 国产亚洲一区字幕| 欧洲国内综合视频| 欧美性感一区二区三区| 丁香激情综合国产| 国产电影一区在线| 色婷婷亚洲婷婷| 91精品国产色综合久久| 精品国产一区二区三区久久影院 | 丰满白嫩尤物一区二区| 美女视频黄a大片欧美| 亚洲精品日产精品乱码不卡| 综合激情网...| 日韩码欧中文字| 欧美精选午夜久久久乱码6080| 亚洲电影在线播放| 欧美一区二区三区爱爱| 国产黄色成人av| 亚洲精品伦理在线| 日韩一区二区精品| 成人黄页在线观看| 五月婷婷另类国产| 久久久国产精品麻豆| 色先锋aa成人| 日本午夜精品一区二区三区电影 | 欧美日韩一区三区| 国产精品久久久久桃色tv| 麻豆国产精品一区二区三区 | 欧美系列日韩一区| 欧美电影免费观看高清完整版| 亚洲美女电影在线| 国产成人av网站| 97se亚洲国产综合自在线|