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

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

?? configurationkey.java

?? java servlet著名論壇源代碼
?? 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.1 2003/12/09 08:25:30 huumai 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一区二区三区免费野_久草精品视频
2017欧美狠狠色| 欧美a级理论片| 免费观看久久久4p| 91丨九色丨黑人外教| 日韩一区二区三区在线观看| 国产精品毛片高清在线完整版 | 亚洲欧美日韩国产综合在线| 午夜视频在线观看一区| 成人精品gif动图一区| 日韩一区二区麻豆国产| 一区二区三区在线观看欧美| 国产九九视频一区二区三区| 日韩欧美激情在线| 性感美女极品91精品| 99在线热播精品免费| 久久久精品国产99久久精品芒果| 日韩在线a电影| 91国偷自产一区二区三区成为亚洲经典| 2023国产精品自拍| 毛片av一区二区| 欧美一级精品在线| 天堂一区二区在线| 欧美二区在线观看| 亚洲va中文字幕| 在线观看亚洲成人| 亚洲综合激情另类小说区| 成人黄色电影在线| 国产精品全国免费观看高清| 国产精品白丝jk黑袜喷水| 精品国产91亚洲一区二区三区婷婷| 三级欧美在线一区| 欧美日韩卡一卡二| 天堂va蜜桃一区二区三区漫画版| 欧美性高清videossexo| 亚洲午夜免费电影| 欧美唯美清纯偷拍| 香蕉乱码成人久久天堂爱免费| 欧美亚洲动漫制服丝袜| 亚洲国产一二三| 在线不卡中文字幕| 美腿丝袜亚洲三区| 久久久噜噜噜久噜久久综合| 国产精品18久久久久久vr| 国产日韩精品久久久| 成人午夜免费av| 亚洲三级在线观看| 91黄视频在线| 蜜臀a∨国产成人精品| 2024国产精品| 99久久精品费精品国产一区二区| 亚洲乱码精品一二三四区日韩在线| 欧美亚洲愉拍一区二区| 日本中文一区二区三区| 久久女同精品一区二区| 国产黄人亚洲片| 日韩久久一区二区| 91精品国产一区二区三区| 韩国欧美国产1区| 亚洲天堂2016| 欧美精品免费视频| 国产精选一区二区三区| 亚洲精品高清在线| 日韩情涩欧美日韩视频| 波多野洁衣一区| 午夜精品一区二区三区免费视频| 日韩三级av在线播放| 日韩精品综合一本久道在线视频| 国产精品一区二区三区99| 亚洲图片欧美激情| 欧美哺乳videos| 一本色道a无线码一区v| 蜜桃av一区二区三区电影| 国产精品福利av| 日韩一区二区麻豆国产| 97久久久精品综合88久久| 丝袜亚洲另类欧美| 一区精品在线播放| 欧美一二三四在线| 日本高清无吗v一区| 国产乱国产乱300精品| 亚洲国产美女搞黄色| 欧美国产日产图区| 91精品欧美综合在线观看最新| 国产超碰在线一区| 日韩**一区毛片| 一区二区三区不卡视频| 国产亚洲精品中文字幕| 欧美丰满美乳xxx高潮www| 91视频免费看| 国产激情一区二区三区桃花岛亚洲| 首页综合国产亚洲丝袜| 亚洲视频资源在线| 中文幕一区二区三区久久蜜桃| 日韩一区二区在线免费观看| 欧美吻胸吃奶大尺度电影 | 1区2区3区国产精品| 欧美第一区第二区| 欧美精品v日韩精品v韩国精品v| caoporn国产精品| 国产盗摄一区二区| 精品一区二区三区香蕉蜜桃| 视频一区在线播放| 五月激情综合婷婷| 亚洲午夜电影网| 亚洲综合网站在线观看| 久久这里只有精品首页| 欧美大片日本大片免费观看| 91精品国产乱码久久蜜臀| 欧美精品丝袜中出| 欧美精品自拍偷拍动漫精品| 欧美系列一区二区| 欧美色偷偷大香| 精品视频1区2区| 欧美日本乱大交xxxxx| 欧美日韩在线播放三区| 欧美日韩精品三区| 欧美日本韩国一区二区三区视频| 欧美日韩一区中文字幕| 欧美精品v日韩精品v韩国精品v| 欧美日韩美少妇| 日韩一区二区三区精品视频| 欧美一级精品在线| 欧美成人vr18sexvr| 精品伦理精品一区| 久久久久久综合| 亚洲国产精品t66y| 亚洲欧美另类图片小说| 亚洲福利视频一区二区| 日日噜噜夜夜狠狠视频欧美人| 免费在线观看不卡| 黑人精品欧美一区二区蜜桃| 国产一本一道久久香蕉| eeuss鲁片一区二区三区在线看| 国产精品私人影院| 欧美视频在线一区| 日韩欧美一级精品久久| 国产情人综合久久777777| 日韩一区在线免费观看| 亚洲高清在线视频| 久久福利视频一区二区| 懂色av一区二区三区免费看| av电影一区二区| 欧美人妇做爰xxxⅹ性高电影| 精品精品国产高清a毛片牛牛| 中文字幕乱码久久午夜不卡| 亚洲成人免费在线| 经典一区二区三区| 91在线国产福利| 欧美精品v日韩精品v韩国精品v| 久久久天堂av| 亚洲网友自拍偷拍| 精品一区二区在线观看| 91同城在线观看| 日韩欧美一区电影| 亚洲裸体xxx| 精品一区二区三区日韩| 色综合久久久网| 欧美精品一区视频| 亚洲大尺度视频在线观看| 国产精品一区二区三区99| 欧美日韩激情在线| 国产欧美一区二区三区网站| 亚洲va国产va欧美va观看| 成人亚洲一区二区一| 日韩午夜激情视频| 一区二区三区在线看| 国产麻豆成人传媒免费观看| 欧美日韩日日骚| 日韩一区有码在线| 国产99久久久久久免费看农村| 欧美日韩中字一区| 中文字幕一区日韩精品欧美| 精品一区二区影视| 5月丁香婷婷综合| 亚洲九九爱视频| 国产不卡高清在线观看视频| 欧美久久一二三四区| 亚洲美女在线一区| 成人av综合一区| 久久免费精品国产久精品久久久久| 亚洲一区二区三区视频在线| 99re热这里只有精品免费视频| 久久精品这里都是精品| 久久电影网站中文字幕| 这里只有精品电影| 亚洲一区二区三区四区在线免费观看 | 国产精品国产三级国产有无不卡 | 91行情网站电视在线观看高清版| 国产亚洲一区二区三区在线观看| 久久国产剧场电影| 日韩视频在线一区二区| 日韩国产欧美视频| 欧美日韩aaa| 日韩专区中文字幕一区二区| 欧美在线你懂得| 亚洲风情在线资源站| 欧美日韩国产另类一区| 首页国产欧美久久| 欧美大片在线观看一区二区| 蜜桃视频在线观看一区二区|