Mercurial > hg > Database > jungle-sharp
comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle-main/store/transformer/replaceRootNodeAt.cs @ 10:abe0c247f5a5
Add Network module. but, unComplete NetworkDefaultJungleTreeEditor.cs
author | Kazuma Takeda <kazuma-arashi@hotmail.co.jp> |
---|---|
date | Sun, 23 Oct 2016 07:40:50 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:e6ad9016601c | 10:abe0c247f5a5 |
---|---|
1 using System.Collections; | |
2 | |
3 public class replaceRootNodeAt : NodeEditor { | |
4 public Either<Error, LoggingNode> _edit(LoggingNode _e) | |
5 { | |
6 Either<Error,LoggingNode> either = _e.replaceNewRootNode(); | |
7 if(either.isA()){ | |
8 // error | |
9 return either; | |
10 } | |
11 return DefaultEither<Error, LoggingNode>.newB(either.b()); | |
12 } | |
13 | |
14 public Either<Error, LoggingNode> edit(TreeNode _e) { | |
15 LoggingNode logNode = wrap(_e); | |
16 return _edit(logNode); | |
17 } | |
18 | |
19 public LoggingNode wrap(TreeNode node) { | |
20 return new LoggingNode(node); | |
21 } | |
22 | |
23 | |
24 public LoggingNode wrap(TreeNode node, OperationLog op) { | |
25 return new LoggingNode(node, op); | |
26 } | |
27 | |
28 | |
29 } |