OSDN Git Service

removed all files
[xerial/xerial-core.git] / src / main / java / org / xerial / util / xml / SinglePathBuilder.java
diff --git a/src/main/java/org/xerial/util/xml/SinglePathBuilder.java b/src/main/java/org/xerial/util/xml/SinglePathBuilder.java
deleted file mode 100755 (executable)
index 67a12f9..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*--------------------------------------------------------------------------\r
- *  Copyright 2008 Taro L. Saito\r
- *\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *--------------------------------------------------------------------------*/\r
-//--------------------------------------\r
-// XerialJ\r
-//\r
-// SinglePathBuilder.java\r
-// Since: Oct 27, 2008 2:14:57 PM\r
-//\r
-// $URL: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core/src/main/java/org/xerial/util/xml/SinglePathBuilder.java $\r
-// $Author: leo $\r
-//--------------------------------------\r
-package org.xerial.util.xml;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Iterator;\r
-import java.util.NoSuchElementException;\r
-\r
-import org.xerial.util.xml.SinglePath.PathType;\r
-\r
-/**\r
- * A builder class for generating {@link SinglePath} instance\r
- * \r
- * @author leo\r
- * \r
- */\r
-public class SinglePathBuilder implements Iterable<String>\r
-{\r
-    private ArrayList<String> _path = new ArrayList<String>();\r
-    private PathType _pathType = PathType.AbsolutePath;\r
-\r
-    public SinglePathBuilder()\r
-    {}\r
-\r
-    public static SinglePathBuilder relativePathBuilder()\r
-    {\r
-        SinglePathBuilder builder = new SinglePathBuilder();\r
-        builder.setPathType(PathType.RelativePath);\r
-        return builder;\r
-    }\r
-\r
-    public SinglePathBuilder setPathType(PathType pathType)\r
-    {\r
-        this._pathType = pathType;\r
-        return this;\r
-    }\r
-\r
-    public SinglePathBuilder addChild(String tagName)\r
-    {\r
-        _path.add(tagName);\r
-        return this;\r
-    }\r
-\r
-    public SinglePathBuilder removeLeaf()\r
-    {\r
-        if (_path.size() <= 0)\r
-            throw new NoSuchElementException("no leaf to remove");\r
-        _path.remove(_path.size() - 1);\r
-        return this;\r
-    }\r
-\r
-    public int size()\r
-    {\r
-        return _path.size();\r
-    }\r
-\r
-    public SinglePath build()\r
-    {\r
-        return new SinglePath(_pathType, _path);\r
-    }\r
-\r
-    public Iterator<String> iterator()\r
-    {\r
-        return _path.iterator();\r
-    }\r
-}\r