Mercurial > hg > Database > jungle-network
comparison src/main/java/alice/jungle/operations/NetworkAppendChildAtOperation.java @ 179:2828205bdc3a
fit JungleCore
author | tatsuki |
---|---|
date | Sat, 13 Sep 2014 12:54:02 +0900 |
parents | 6f104ab4eb81 |
children |
comparison
equal
deleted
inserted
replaced
178:d6944d788121 | 179:2828205bdc3a |
---|---|
1 package alice.jungle.operations; | 1 package alice.jungle.operations; |
2 | 2 |
3 import java.nio.ByteBuffer; | 3 import java.nio.ByteBuffer; |
4 | 4 |
5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command; | 5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command; |
6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; | |
6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation; | 7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation; |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; | |
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; | |
7 | 10 |
8 import org.msgpack.annotation.Message; | 11 import org.msgpack.annotation.Message; |
9 | 12 |
10 | 13 |
11 @Message | 14 @Message |
20 | 23 |
21 public NetworkAppendChildAtOperation(int _pos) { | 24 public NetworkAppendChildAtOperation(int _pos) { |
22 pos = _pos; | 25 pos = _pos; |
23 } | 26 } |
24 | 27 |
25 @Override | 28 public Command getCommand() |
26 public Command getCommand() { | 29 { |
27 return Command.APPEND_CHILD; | 30 return Command.APPEND_CHILD; |
28 } | 31 } |
29 | 32 |
30 /*@Override | 33 @Override |
31 public <T extends TreeNode> Either<Error, TreeNode> invoke(TreeNode _target) { | 34 public Either<Error,TreeNode> invoke(TreeNode _target) |
32 NetworkAppendChildAt appendChildAt = new NetworkAppendChildAt(pos); | 35 { |
33 return appendChildAt.edit(_target); | 36 return _target.getChildren().addNewChildAt(pos); |
34 }*/ | 37 } |
35 | 38 |
36 @Override | 39 @Override |
37 public int getPosition() { | 40 public int getPosition() |
41 { | |
38 return pos; | 42 return pos; |
39 } | 43 } |
40 | 44 |
41 @Override | 45 @Override |
42 public String getKey() { | 46 public String getKey() |
47 { | |
43 return null; | 48 return null; |
44 } | 49 } |
45 | 50 |
46 @Override | 51 @Override |
47 public ByteBuffer getValue() { | 52 public ByteBuffer getValue() |
53 { | |
48 return null; | 54 return null; |
49 } | 55 } |
50 } | 56 } |