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

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

?? hierarchicalconfiguration.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):

    /**
     * <p>Returns an iterator with all keys defined in this configuration.</p>
     * <p>Note that the keys returned by this method will not contain
     * any indices. This means that some structure will be lost.</p>
     * @return an iterator with the defined keys in this configuration
     */
    public Iterator getKeys()
    {
        DefinedKeysVisitor visitor = new DefinedKeysVisitor();
        getRoot().visit(visitor, new ConfigurationKey());
        return visitor.getKeyList().iterator();
    }

    /**
     * Creates a new <code>Configuration</code> object containing all keys
     * that start with the specified prefix. This implementation will return
     * a <code>HierarchicalConfiguration</code> object so that the structure
     * of the keys will be saved.
     * @param prefix the prefix of the keys for the subset
     * @return a new configuration object representing the selected subset
     */
    public Configuration subset(String prefix)
    {
        Collection nodes = fetchNodeList(prefix);
        if (nodes.isEmpty())
        {
            return null;
        } /* if */

        HierarchicalConfiguration result = new HierarchicalConfiguration();
        CloneVisitor visitor = new CloneVisitor();

        for (Iterator it = nodes.iterator(); it.hasNext();)
        {
            Node nd = (Node) it.next();
            nd.visit(visitor, null);

            Container children = visitor.getClone().getChildren();
            if (children.size() > 0)
            {
                for (int i = 0; i < children.size(); i++)
                {
                    result.getRoot().addChild((Node) children.get(i));
                } /* for */
            } /* if */
            else
            {
                // In this case we cannot shorten the key because only
                // values are found without further child nodes.
                result.getRoot().addChild(visitor.getClone());
            } /* else */
        } /* for */

        return (result.isEmpty()) ? null : result;
    }

    /**
     * Returns the maximum defined index for the given key. This is
     * useful if there are multiple values for this key. They can then be
     * addressed separately by specifying indices from 0 to the return value
     * of this method.
     * @param key the key to be checked
     * @return the maximum defined index for this key
     */
    public int getMaxIndex(String key)
    {
        return fetchNodeList(key).size() - 1;
    }

    /**
     * Helper method for fetching a list of all nodes that are addressed by
     * the specified key.
     * @param key the key
     * @return a list with all affected nodes (never <b>null</b>)
     */
    protected List fetchNodeList(String key)
    {
        List nodes = new LinkedList();
        findPropertyNodes(
            new ConfigurationKey(key).iterator(),
            getRoot(),
            nodes);
        return nodes;
    }

    /**
     * Recursive helper method for fetching a property. This method
     * processes all facets of a configuration key, traverses the tree of
     * properties and fetches the the nodes of all matching properties.
     * @param keyPart the configuration key iterator
     * @param node the actual node
     * @param data here the found nodes are stored
     */
    protected void findPropertyNodes(
        ConfigurationKey.KeyIterator keyPart,
        Node node,
        Collection data)
    {
        if (!keyPart.hasNext())
        {
            data.add(node);
        } /* if */

        else
        {
            String key = keyPart.nextKey(true);
            Container children = node.getChildren(key);
            if (keyPart.hasIndex())
            {
                if (keyPart.getIndex() < children.size()
                    && keyPart.getIndex() >= 0)
                {
                    findPropertyNodes(
                        (ConfigurationKey.KeyIterator) keyPart.clone(),
                        (Node) children.get(keyPart.getIndex()),
                        data);
                } /* if */
            } /* if */

            else
            {
                for (Iterator it = children.iterator(); it.hasNext();)
                {
                    findPropertyNodes(
                        (ConfigurationKey.KeyIterator) keyPart.clone(),
                        (Node) it.next(),
                        data);
                } /* for */
            } /* else */
        }
    }

    /**
     * Checks if the specified node is defined.
     * @param node the node to be checked
     * @return a flag if this node is defined
     */
    protected boolean nodeDefined(Node node)
    {
        DefinedVisitor visitor = new DefinedVisitor();
        node.visit(visitor, null);
        return visitor.isDefined();
    }

    /**
     * Removes the specified node from this configuration. This method
     * ensures that parent nodes that become undefined by this operation
     * are also removed.
     * @param node the node to be removed
     */
    protected void removeNode(Node node)
    {
        Node parent = node.getParent();
        if (parent != null)
        {
            parent.remove(node);
            if (!nodeDefined(parent))
            {
                removeNode(parent);
            } /* if */
        } /* if */
    }

    /**
     * Returns a reference to the parent node of an add operation.
     * Nodes for new properties can be added as children of this node.
     * If the path for the specified key does not exist so far, it is created
     * now.
     * @param keyIt the iterator for the key of the new property
     * @param startNode the node to start the search with
     * @return the parent node for the add operation
     */
    protected Node fetchAddNode(
        ConfigurationKey.KeyIterator keyIt,
        Node startNode)
    {
        if (!keyIt.hasNext())
        {
            throw new IllegalArgumentException("Key must be defined!");
        } /* if */

        return createAddPath(keyIt, findLastPathNode(keyIt, startNode));
    }

    /**
     * Finds the last existing node for an add operation. This method
     * traverses the configuration tree along the specified key. The last
     * existing node on this path is returned.
     * @param keyIt the key iterator
     * @param node the actual node
     * @return the last existing node on the given path
     */
    protected Node findLastPathNode(
        ConfigurationKey.KeyIterator keyIt,
        Node node)
    {
        String keyPart = keyIt.nextKey(true);

        if (keyIt.hasNext())
        {
            Container c = node.getChildren(keyPart);
            int idx = (keyIt.hasIndex()) ? keyIt.getIndex() : c.size() - 1;
            if (idx < 0 || idx >= c.size())
            {
                return node;
            } /* if */
            else
            {
                return findLastPathNode(keyIt, (Node) c.get(idx));
            } /* else */
        } /* if */

        else
        {
            return node;
        } /* else */
    }

    /**
     * Creates the missing nodes for adding a new property. This method
     * ensures that there are corresponding nodes for all components of the
     * specified configuration key.
     * @param keyIt the key iterator
     * @param root the base node of the path to be created
     * @return the last node of the path
     */
    protected Node createAddPath(ConfigurationKey.KeyIterator keyIt, Node root)
    {
        if (keyIt.hasNext())
        {
            Node child = new Node(keyIt.currentKey(true));
            root.addChild(child);
            keyIt.next();
            return createAddPath(keyIt, child);
        } /* if */
        else
        {
            return root;
        } /* else */
    }

    /**
     * Helper method for adding all elements of a collection to a
     * container.
     * @param cont the container
     * @param items the collection to be added
     */
    private static void addContainer(Container cont, Collection items)
    {
        for (Iterator it = items.iterator(); it.hasNext();)
        {
            cont.add(it.next());
        } /* for */
    }

    /**
     * A data class for storing (hierarchical) property information. A property
     * can have a value and an arbitrary number of child properties.
     *
     * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
     */
    public static class Node implements Serializable, Cloneable
    {
        /** Stores a reference to this node's parent.*/
        private Node parent;

        /** Stores the name of this node.*/
        private String name;

        /** Stores the value of this node.*/
        private Object value;

        /** Stores the children of this node.*/
        private Map children;

        /**
         * Creates a new instance of <code>Node</code>.
         */
        public Node()
        {
            this(null);
        }

        /**
         * Creates a new instance of <code>Node</code> and sets the name.
         * @param name the node's name
         */
        public Node(String name)
        {
            setName(name);
        }

        /**
         * Returns the name of this node.
         * @return the node name
         */
        public String getName()
        {
            return name;
        }

        /**
         * Returns the value of this node.
         * @return the node value (may be <b>null</b>)
         */
        public Object getValue()
        {
            return value;
        }

        /**
         * Returns the parent of this node.
         * @return this node's parent (can be <b>null</b>)
         */
        public Node getParent()
        {
            return parent;
        }

        /**
         * Sets the name of this node.
         * @param string the node name
         */
        public void setName(String string)
        {
            name = string;
        }

        /**
         * Sets the value of this node.
         * @param object the node value
         */
        public void setValue(Object object)
        {
            value = object;
        }

        /**
         * Sets the parent of this node.
         * @param node the parent node
         */
        public void setParent(Node node)
        {
            parent = node;
        }

        /**
         * Adds the specified child object to this node. Note that there can
         * be multiple children with the same name.
         * @param child the child to be added
         */
        public void addChild(Node child)
        {
            if (children == null)
            {
                children = new SequencedHashMap();
            } /* if */

            List c = (List) children.get(child.getName());
            if (c == null)
            {
                c = new ArrayList();
                children.put(child.getName(), c);
            } /* if */

            c.add(child);
            child.setParent(this);
        }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费av高清| 一区二区三区在线不卡| 亚洲成av人片一区二区三区| 国产成人av电影| 日韩午夜中文字幕| 亚洲综合色视频| av在线不卡观看免费观看| 精品久久久久久久人人人人传媒| 一区二区三区国产精华| 成人激情开心网| 久久久久高清精品| 久久99精品一区二区三区三区| 欧美亚洲一区二区在线| 亚洲人成7777| www.亚洲色图.com| 国产视频一区在线播放| 国模一区二区三区白浆| 欧美一区二区三区婷婷月色| 亚洲电影第三页| 色妹子一区二区| 亚洲男人电影天堂| 成人97人人超碰人人99| 国产剧情av麻豆香蕉精品| 在线成人小视频| 亚洲v精品v日韩v欧美v专区| 色呦呦一区二区三区| 中文字幕在线免费不卡| 国产91精品露脸国语对白| 久久久久久一二三区| 韩国女主播成人在线观看| 日韩一区二区电影网| 日本午夜一本久久久综合| 欧美日韩成人综合| 五月天一区二区三区| 欧美片在线播放| 日本美女一区二区三区视频| 91.com视频| 毛片一区二区三区| 精品久久人人做人人爰| 国产在线一区二区综合免费视频| 欧美精品一区二区三区一线天视频| 秋霞电影网一区二区| 日韩欧美中文字幕一区| 极品少妇xxxx偷拍精品少妇| 精品99久久久久久| 国产精品香蕉一区二区三区| 久久久久久久久久久黄色| 国产高清精品网站| 国产精品久久久久久久第一福利| www.66久久| 一区二区三区鲁丝不卡| 欧美日韩成人在线| 麻豆国产欧美日韩综合精品二区| 精品卡一卡二卡三卡四在线| 国产精品 日产精品 欧美精品| 欧美高清在线一区二区| www.在线成人| 亚洲图片欧美一区| 日韩三级中文字幕| 国产精品一区一区| 亚洲日本欧美天堂| 欧美肥妇毛茸茸| 国内精品第一页| 最新欧美精品一区二区三区| 欧美吻胸吃奶大尺度电影| 免费观看30秒视频久久| 久久影院视频免费| 99国产欧美久久久精品| 亚洲第一综合色| 精品电影一区二区| 91麻豆产精品久久久久久| 亚洲精品视频在线观看免费| 欧美日本在线播放| 国产一区欧美一区| 亚洲图片激情小说| 欧美日韩一区二区电影| 国产在线精品不卡| 亚洲乱码日产精品bd| 91精品国产综合久久久蜜臀粉嫩 | 亚洲一级二级三级在线免费观看| 日本aⅴ亚洲精品中文乱码| 日韩欧美不卡一区| av中文字幕不卡| 婷婷综合久久一区二区三区| 国产亚洲一区二区三区四区| 色婷婷国产精品| 裸体健美xxxx欧美裸体表演| 国产一区二区三区高清播放| 成人免费高清视频在线观看| a在线播放不卡| 91黄色免费网站| 91精品国产日韩91久久久久久| 99精品热视频| 亚洲国产精品久久艾草纯爱| 久久久久久电影| 在线观看一区二区视频| 国内精品嫩模私拍在线| 亚洲精品国久久99热| 欧美精品一区视频| 91久久精品日日躁夜夜躁欧美| 国产真实乱对白精彩久久| 夜夜嗨av一区二区三区| 国产欧美日韩精品a在线观看| 欧美日韩第一区日日骚| 成人av资源站| 狠狠色丁香婷婷综合久久片| 一区二区在线观看免费视频播放 | 国内精品在线播放| 亚洲已满18点击进入久久| 久久男人中文字幕资源站| 精品视频在线免费| 99久久精品国产精品久久| 久久国产综合精品| 亚洲五码中文字幕| 最新热久久免费视频| 国产午夜精品一区二区三区四区| 欧美精品日韩一本| 色婷婷国产精品综合在线观看| 国产精品1区二区.| 日本欧美一区二区在线观看| 一区二区激情小说| 亚洲欧洲日产国码二区| 久久久久久麻豆| 日韩精品一区二区三区老鸭窝| 欧美日韩亚洲高清一区二区| 99久久精品国产麻豆演员表| 国产精品自拍av| 久久成人麻豆午夜电影| 视频一区视频二区在线观看| 亚洲一区二区中文在线| 亚洲人成人一区二区在线观看| 国产欧美日韩一区二区三区在线观看| 日韩精品一区二区三区swag| 欧美绝品在线观看成人午夜影视| 色哟哟欧美精品| 91原创在线视频| 91在线观看一区二区| 成人天堂资源www在线| 国产精品99久久不卡二区| 国产综合一区二区| 麻豆国产精品视频| 免费观看久久久4p| 免费成人美女在线观看| 日产国产高清一区二区三区| 午夜精品免费在线| 亚洲一区二区三区国产| 亚洲最新视频在线观看| 亚洲精品国产精品乱码不99| 成人av电影观看| 91在线视频免费观看| 99久久精品免费看国产免费软件| 成人自拍视频在线观看| 成人综合激情网| 不卡在线观看av| 99免费精品视频| 色老综合老女人久久久| 欧美四级电影网| 欧美日韩国产乱码电影| 欧美精品日韩精品| 日韩欧美精品三级| 久久夜色精品一区| 中国色在线观看另类| 国产精品伦一区| 亚洲日本在线天堂| 亚洲国产综合视频在线观看| 亚洲mv大片欧洲mv大片精品| 首页亚洲欧美制服丝腿| 麻豆freexxxx性91精品| 国产一区二区三区四| 成人av一区二区三区| 99九九99九九九视频精品| 91九色最新地址| 51精品秘密在线观看| 欧美大胆人体bbbb| 国产视频一区二区在线| 亚洲欧洲日韩av| 午夜久久久久久电影| 美女被吸乳得到大胸91| 国产福利一区在线| 91麻豆免费在线观看| 欧美日韩小视频| 精品日产卡一卡二卡麻豆| 国产精品―色哟哟| 一区二区三区四区高清精品免费观看| 午夜精品久久久久久久| 狠狠久久亚洲欧美| 成人精品国产免费网站| 在线视频观看一区| 精品日韩在线观看| 国产精品色噜噜| 亚洲一区在线电影| 久久99久久99精品免视看婷婷 | 国产suv精品一区二区6| 99精品一区二区三区| 7777精品伊人久久久大香线蕉最新版| 精品国产污污免费网站入口 | 中文字幕在线观看不卡视频| 亚洲国产成人av网| 黄色日韩网站视频| 色av综合在线|