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

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

?? hierarchicalconfiguration.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:

        /**
         * Returns a list with the child nodes of this node.
         * @return a list with the children (can be empty, but never
         * <b>null</b>)
         */
        public Container getChildren()
        {
            Container result = new Container();

            if (children != null)
            {
                for (Iterator it = children.values().iterator(); it.hasNext();)
                {
                    addContainer(result, (Collection) it.next());
                } /* for */
            } /* if */

            return result;
        }

        /**
         * Returns a list with this node's children with the given name.
         * @param name the name of the children
         * @return a list with all chidren with this name; may be empty, but
         * never <b>null</b>
         */
        public Container getChildren(String name)
        {
            if (name == null || children == null)
            {
                return getChildren();
            } /* if */

            Container cont = new Container();
            List c = (List) children.get(name);
            if (c != null)
            {
                addContainer(cont, c);
            } /* if */

            return cont;
        }

        /**
         * Removes the specified child from this node.
         * @param child the child node to be removed
         * @return a flag if the child could be found
         */
        public boolean remove(Node child)
        {
            if (children == null)
            {
                return false;
            } /* if */

            List c = (List) children.get(child.getName());
            if (c == null)
            {
                return false;
            } /* if */

            else
            {
                if (c.remove(child))
                {
                    if (c.isEmpty())
                    {
                        children.remove(child.getName());
                    } /* if */
                    return true;
                } /* if */
                else
                {
                    return false;
                } /* else */
            } /* else */
        }

        /**
         * Removes all children with the given name.
         * @param name the name of the children to be removed
         * @return a flag if children with this name existed
         */
        public boolean remove(String name)
        {
            if (children == null)
            {
                return false;
            } /* if */

            return children.remove(name) != null;
        }

        /**
         * Removes all children of this node.
         */
        public void removeChildren()
        {
            children = null;
        }

        /**
         * A generic method for traversing this node and all of its children.
         * This method sends the passed in visitor to this node and all of its
         * children.
         * @param visitor the visitor
         * @param key here a configuration key with the name of the root node
         * of the iteration can be passed; if this key is not <b>null</b>, the
         * full pathes to the visited nodes are builded and passed to the
         * visitor's <code>visit()</code> methods
         */
        public void visit(NodeVisitor visitor, ConfigurationKey key)
        {
            int length = 0;
            if (key != null)
            {
                length = key.length();
                if (getName() != null)
                {
                    key.append(getName());
                } /* if */
            } /* if */

            visitor.visitBeforeChildren(this, key);

            if (children != null)
            {
                for (Iterator it = children.values().iterator();
                    it.hasNext() && !visitor.terminate();
                    )
                {
                    Collection col = (Collection) it.next();
                    for (Iterator it2 = col.iterator();
                        it2.hasNext() && !visitor.terminate();
                        )
                    {
                        ((Node) it2.next()).visit(visitor, key);
                    } /* for */
                } /* for */
            } /* if */

            if (key != null)
            {
                key.setLength(length);
            } /* if */
            visitor.visitAfterChildren(this, key);
        }

        /**
         * Creates a copy of this object. This is not a deep copy, the children
         * are not cloned.
         * @return a copy of this object
         */
        protected Object clone()
        {
            try
            {
                return super.clone();
            } /* try */
            catch (CloneNotSupportedException cex)
            {
                return null; // should not happen
            } /* catch */
        }
    }

    /**
     * <p>Definition of a visitor class for traversing a node and all of its
     * children.</p>
     * <p>This class defines the interface of a visitor for <code>Node</code>
     * objects and provides a default implementation. The method
     * <code>visit()</code> of <code>Node</code> implements a generic
     * iteration algorithm based on the <em>Visitor</em> pattern. By
     * providing different implementations of visitors it is possible to
     * collect different data during the iteration process.</p>
     *
     * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
     */
    public static class NodeVisitor
    {
        /**
         * Visits the specified node. This method is called during iteration
         * for each node before its children have been visited.
         * @param node the actual node
         * @param key the key of this node (may be <b>null</b>)
         */
        public void visitBeforeChildren(Node node, ConfigurationKey key)
        {
        }

        /**
         * Visits the specified node after its children have been processed.
         * This gives a visitor the opportunity of collecting additional data
         * after the child nodes have been visited.
         * @param node the node to be visited
         * @param key the key of this node (may be <b>null</b>)
         */
        public void visitAfterChildren(Node node, ConfigurationKey key)
        {
        }

        /**
         * Returns a flag that indicates if iteration should be stopped. This
         * method is called after each visited node. It can be useful for
         * visitors that search a specific node. If this node is found, the
         * whole process can be stopped. This base implementation always
         * returns <b>false</b>.
         * @return a flag if iteration should be stopped
         */
        public boolean terminate()
        {
            return false;
        }
    }

    /**
     * A specialized visitor that checks if a node is defined.
     * &quot;Defined&quot; in this terms means that the node or at least one
     * of its sub nodes is associated with a value.
     *
     * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
     */
    static class DefinedVisitor extends NodeVisitor
    {
        /** Stores the defined flag.*/
        private boolean defined;

        /**
         * Checks if iteration should be stopped. This can be done if the first
         * defined node is found.
         * @return a flag if iteration should be stopped
         */
        public boolean terminate()
        {
            return isDefined();
        }

        /**
         * Visits the node. Checks if a value is defined.
         * @param node the actual node
         * @param key the key of this node
         */
        public void visitBeforeChildren(Node node, ConfigurationKey key)
        {
            defined = node.getValue() != null;
        }

        /**
         * Returns the defined flag.
         * @return the defined flag
         */
        public boolean isDefined()
        {
            return defined;
        }
    }

    /**
     * A specialized visitor that fills a list with keys that are defined in
     * a node hierarchy.
     *
     * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
     */
    static class DefinedKeysVisitor extends NodeVisitor
    {
        /** Stores the list to be filled.*/
        private Set keyList;

        /**
         * Default constructor.
         */
        public DefinedKeysVisitor()
        {
            keyList = new HashSet();
        }

        /**
         * Returns the list with all defined keys.
         * @return the list with the defined keys
         */
        public Set getKeyList()
        {
            return keyList;
        }

        /**
         * Visits the specified node. If this node has a value, its key is
         * added to the internal list.
         * @param node the node to be visited
         * @param key the key of this node
         */
        public void visitBeforeChildren(Node node, ConfigurationKey key)
        {
            if (node.getValue() != null && key != null)
            {
                keyList.add(key.toString());
            } /* if */
        }
    }

    /**
     * A specialized visitor that is able to create a deep copy of a node
     * hierarchy.
     *
     * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
     */
    static class CloneVisitor extends NodeVisitor
    {
        /** A stack with the actual object to be copied.*/
        private Stack copyStack;

        /** Stores the result of the clone process.*/
        private Node result;

        /**
         * Creates a new instance of <code>CloneVisitor</code>.
         */
        public CloneVisitor()
        {
            copyStack = new Stack();
        }

        /**
         * Visits the specified node after its children have been processed.
         * @param node the node
         * @param key the key of this node
         */
        public void visitAfterChildren(Node node, ConfigurationKey key)
        {
            copyStack.pop();
            if (copyStack.isEmpty())
            {
                result = node;
            } /* if */
        }

        /**
         * Visits and copies the specified node.
         * @param node the node
         * @param key the key of this node
         */
        public void visitBeforeChildren(Node node, ConfigurationKey key)
        {
            Node copy = (Node) node.clone();
            copy.removeChildren();

            if (!copyStack.isEmpty())
            {
                ((Node) copyStack.peek()).addChild(copy);
            } /* if */

            copyStack.push(copy);
        }

        /**
         * Returns the result of the clone process. This is the root node of
         * the cloned node hierarchy.
         * @return the cloned root node
         */
        public Node getClone()
        {
            return result;
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线亚洲高清视频| 国产综合色产在线精品| 91福利视频网站| 亚洲自拍偷拍麻豆| 欧美专区在线观看一区| 日韩av午夜在线观看| 欧美mv日韩mv亚洲| 国产a久久麻豆| 亚洲另类在线一区| 欧美巨大另类极品videosbest | 一区二区三区国产精华| 欧美性猛交xxxxxx富婆| 蜜桃传媒麻豆第一区在线观看| 欧美成人a∨高清免费观看| 国产高清在线观看免费不卡| 亚洲四区在线观看| 777久久久精品| 东方欧美亚洲色图在线| 亚洲男人的天堂网| 日韩午夜激情电影| 成人av免费观看| 日韩高清不卡在线| 国产精品污污网站在线观看| 在线中文字幕一区| 久久99精品久久久| 中文字幕在线观看一区二区| 在线免费观看视频一区| 精品亚洲国产成人av制服丝袜 | 国内欧美视频一区二区| 自拍偷拍国产精品| 日韩欧美在线1卡| 色综合天天综合给合国产| 日本不卡123| 亚洲欧美一区二区在线观看| 欧美一级免费大片| 色8久久精品久久久久久蜜| 狠狠色丁香九九婷婷综合五月| 中文字幕一区视频| 久久综合色一综合色88| 欧美在线观看你懂的| 国产成人av影院| 亚洲国产一区二区视频| 日本一区二区综合亚洲| 日韩欧美中文字幕一区| 欧美怡红院视频| 国产成人欧美日韩在线电影| 精彩视频一区二区三区| 亚洲国产精品自拍| 亚洲日本在线观看| 中文在线资源观看网站视频免费不卡| 欧美日韩免费视频| 91麻豆swag| 成人国产精品免费观看视频| 精品午夜久久福利影院| 日本不卡视频在线| 亚洲成人动漫一区| 亚洲免费观看视频| 亚洲日本电影在线| 中文成人av在线| 久久久久久黄色| 欧美精品一区二区在线观看| 欧美精品高清视频| 欧洲精品视频在线观看| 成人app在线观看| 国产成人啪免费观看软件| 国产一区二区免费看| 韩国三级中文字幕hd久久精品| 亚洲v中文字幕| 亚洲成人一区在线| 亚洲午夜电影在线观看| 亚洲国产日韩在线一区模特| 亚洲精品日日夜夜| 亚洲综合另类小说| 亚洲愉拍自拍另类高清精品| 亚洲亚洲精品在线观看| 夜色激情一区二区| 一级做a爱片久久| 亚洲国产另类av| 天天做天天摸天天爽国产一区| 午夜欧美电影在线观看| 秋霞成人午夜伦在线观看| 亚洲福利视频一区| 日韩精品一二三区| 美女一区二区久久| 国内外成人在线| 成人精品免费网站| 99r国产精品| 欧美影院午夜播放| 日韩三级免费观看| 国产日韩欧美精品电影三级在线| 国产欧美日韩麻豆91| 国产精品高潮久久久久无| 亚洲免费观看视频| 天堂蜜桃一区二区三区| 久久国产福利国产秒拍| 国产另类ts人妖一区二区| 成人av高清在线| 欧美日韩在线综合| 日韩美女主播在线视频一区二区三区| 欧美tickling挠脚心丨vk| 国产亚洲短视频| 一区二区三区成人| 日本中文字幕一区| 国产福利一区二区| 色综合久久88色综合天天6| 欧美日韩高清在线| 久久免费午夜影院| 亚洲精品乱码久久久久| 日韩电影在线观看网站| 国产不卡视频一区二区三区| 一本到高清视频免费精品| 777午夜精品免费视频| 国产日韩欧美a| 亚洲国产一区二区视频| 国产综合色精品一区二区三区| 91猫先生在线| 精品国内片67194| 中文字幕一区二区日韩精品绯色| 国产揄拍国内精品对白| 色久优优欧美色久优优| 欧美哺乳videos| 一区二区三区中文字幕| 国内精品久久久久影院色| 一本色道久久加勒比精品| 精品日韩在线观看| 一区二区高清在线| 大美女一区二区三区| 91精品在线免费观看| 一区在线中文字幕| 国产在线视频不卡二| 欧美午夜一区二区三区免费大片| 久久日韩精品一区二区五区| 亚洲成人av一区| av不卡免费在线观看| 久久久久久久电影| 开心九九激情九九欧美日韩精美视频电影| 不卡av电影在线播放| 精品国产一区二区三区忘忧草| 一级日本不卡的影视| 99久久久国产精品| 国产欧美精品国产国产专区| 免费不卡在线观看| 欧美日韩成人在线| 亚洲欧美日韩国产综合| 丁香天五香天堂综合| 精品久久国产老人久久综合| 午夜日韩在线观看| 欧美性xxxxxx少妇| 亚洲人成7777| av电影在线观看完整版一区二区| 久久亚洲精品国产精品紫薇| 日本少妇一区二区| 欧美久久一区二区| 婷婷久久综合九色国产成人| 欧美性猛片aaaaaaa做受| 亚洲精品美国一| 91在线丨porny丨国产| 国产精品久久久久精k8| 丁香婷婷深情五月亚洲| 日本一区二区三区国色天香| 国产一区二区三区久久久 | 亚洲成人av电影在线| 一本到不卡免费一区二区| 中文字幕日韩一区| jizz一区二区| 亚洲卡通动漫在线| 在线一区二区观看| 一区二区三区欧美| 在线观看网站黄不卡| 一区二区三区欧美久久| 欧美色男人天堂| 性做久久久久久免费观看欧美| 欧美在线观看视频一区二区三区| 亚洲综合免费观看高清完整版在线 | 欧美日韩国产综合草草| 亚洲成人自拍网| 日韩欧美中文字幕公布| 激情综合色播激情啊| 国产人妖乱国产精品人妖| 成人av在线观| 亚洲免费观看高清完整版在线观看 | 精品美女被调教视频大全网站| 国产永久精品大片wwwapp | 色播五月激情综合网| 亚洲香蕉伊在人在线观| 欧美猛男超大videosgay| 视频一区国产视频| 久久综合九色综合97_久久久| 国产露脸91国语对白| 亚洲天堂成人在线观看| 欧美日韩高清一区二区不卡| 精品系列免费在线观看| 综合自拍亚洲综合图不卡区| 欧美伊人久久大香线蕉综合69| 日韩成人av影视| 国产欧美一区二区精品忘忧草| 一本到一区二区三区| 久久精品国产网站| 1000部国产精品成人观看| 欧美日韩亚洲丝袜制服|