Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 77:0f01ee222035
remove worning a part
author | one |
---|---|
date | Fri, 29 Aug 2014 04:44:26 +0900 |
parents | 2fc0b0313dc0 |
children | 540a27dde42f |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungle.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungleTree.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/Jungle.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/JungleTree.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/impl/DefaultAttributes.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/EditableNode.java |
diffstat | 6 files changed, 21 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungle.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungle.java Fri Aug 29 04:44:26 2014 +0900 @@ -20,24 +20,24 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; -public class DefaultJungle<T extends TreeNode<T>> implements Jungle +public class DefaultJungle<T extends TreeNode<T>> implements Jungle<T> { private Journal journal; - private ConcurrentHashMap<String,JungleTree> trees; + private ConcurrentHashMap<String,JungleTree<T>> trees; private String uuid; private TreeEditor editor; public static <T extends TreeNode<T>>void main(String _args[]) { DefaultJungle<T> j = new DefaultJungle(null,"hoge",new DefaultTreeEditor(new DefaultTraverser())); - JungleTree t = j.createNewTree("fuga"); + JungleTree<T> t = j.createNewTree("fuga"); - JungleTreeEditor e1 = t.getTreeEditor(); - JungleTreeEditor e2 = t.getTreeEditor(); + JungleTreeEditor<T> e1 = t.getTreeEditor(); + JungleTreeEditor<T> e2 = t.getTreeEditor(); DefaultNodePath root = new DefaultNodePath(); - Either<Error,JungleTreeEditor> either = e1.addNewChildAt(root,0); + Either<Error,JungleTreeEditor<T>> either = e1.addNewChildAt(root,0); e1 = either.b(); either = e1.addNewChildAt(root.add(0),0); e1 = either.b(); @@ -47,19 +47,19 @@ public DefaultJungle(Journal _journal,String _uuid,TreeEditor _editor) { journal = new NullJournal(); - trees = new ConcurrentHashMap<String,JungleTree>(); + trees = new ConcurrentHashMap<String,JungleTree<T>>(); uuid = _uuid; editor = _editor; } @Override - public JungleTree getTreeByName(String _name) + public JungleTree<T> getTreeByName(String _name) { return trees.get(_name); } @Override - public JungleTree createNewTree(final String _name) + public JungleTree<T> createNewTree(final String _name) { ChangeList list = new ChangeList(){ @Override
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungleTree.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungleTree.java Fri Aug 29 04:44:26 2014 +0900 @@ -9,7 +9,7 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTransactionManager; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.TreeContext; -public class DefaultJungleTree<T extends TreeNode<T>> implements JungleTree +public class DefaultJungleTree<T extends TreeNode<T>> implements JungleTree<T> { private final AtomicReservableReference<TreeContext<T>> repository; private final String uuid; @@ -25,7 +25,7 @@ } @Override - public JungleTreeEditor getTreeEditor() + public JungleTreeEditor<T> getTreeEditor() { TreeContext<T> tc = repository.get(); DefaultTransactionManager<T> txManager = new DefaultTransactionManager<T>(writer,tc,repository,uuid); @@ -34,7 +34,7 @@ } @Override - public JungleTreeEditor getLocalTreeEditor() + public JungleTreeEditor<T> getLocalTreeEditor() { return getTreeEditor(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/Jungle.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/Jungle.java Fri Aug 29 04:44:26 2014 +0900 @@ -1,7 +1,9 @@ package jp.ac.u_ryukyu.ie.cr.shoshi.jungle; -public interface Jungle +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; + +public interface Jungle<T extends TreeNode<T>> { - public JungleTree getTreeByName(String _name); - public JungleTree createNewTree(String _name); + public JungleTree<T> getTreeByName(String _name); + public JungleTree<T> createNewTree(String _name); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/JungleTree.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/JungleTree.java Fri Aug 29 04:44:26 2014 +0900 @@ -3,9 +3,9 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; -public interface JungleTree<T> +public interface JungleTree<T extends TreeNode<T>> { - public JungleTreeEditor getTreeEditor(); - public JungleTreeEditor getLocalTreeEditor(); + public JungleTreeEditor<T> getTreeEditor(); + public JungleTreeEditor<T> getLocalTreeEditor(); public Node<T> getRootNode(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/impl/DefaultAttributes.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/impl/DefaultAttributes.java Fri Aug 29 04:44:26 2014 +0900 @@ -2,16 +2,11 @@ import java.nio.ByteBuffer; -import fj.data.List; import fj.data.Option; import fj.data.TreeMap; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Attributes; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableAttributes; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableNode; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultEither; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; + public class DefaultAttributes implements Attributes {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/EditableNode.java Fri Aug 29 03:16:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/EditableNode.java Fri Aug 29 04:44:26 2014 +0900 @@ -2,7 +2,6 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.AttributesContainer; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Parent; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; public interface EditableNode<T extends Parent<T>> extends AttributesContainer , Parent<T> {