annotate src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/operations/AppendChildAtOperation.java @ 96:bd82c20a6da0

LoggingNode repair
author one
date Sat, 06 Sep 2014 15:22:46 +0900
parents 14ce7a0dedca
children 371b6ddb78f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
35c661de095d added Parameter ... etc..
Shoshi TAMAKI
parents:
diff changeset
1 package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations;
35c661de095d added Parameter ... etc..
Shoshi TAMAKI
parents:
diff changeset
2
55
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
3 import java.nio.ByteBuffer;
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
4
18
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command;
92
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode;
96
bd82c20a6da0 LoggingNode repair
one
parents: 92
diff changeset
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.LoggingNode;
92
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
81
715a9fbf02fc remove <T> many source
one
parents: 78
diff changeset
10
18
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
11
50
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
12 public final class AppendChildAtOperation implements NodeOperation
16
35c661de095d added Parameter ... etc..
Shoshi TAMAKI
parents:
diff changeset
13 {
50
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
14 private final int pos;
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
15
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
16 public AppendChildAtOperation(int _pos)
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
17 {
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
18 pos = _pos;
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
19 }
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
20
18
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
21 public Command getCommand()
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
22 {
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
23 return Command.APPEND_CHILD;
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
24 }
8d4cbd5a6525 added Operation
Shoshi TAMAKI
parents: 16
diff changeset
25
92
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
26 @Override
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
27 public Either<Error,TreeNode> invoke(TreeNode _target)
50
0a3bff2d9c89 modified operation things
Shoshi TAMAKI
parents: 19
diff changeset
28 {
92
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
29 return _target.getChildren().addNewChildAt(pos);
14ce7a0dedca Logging Node and Editor
one
parents: 81
diff changeset
30 }
55
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
31
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
32 @Override
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
33 public int getPosition()
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
34 {
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
35 return pos;
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
36 }
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
37
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
38 @Override
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
39 public String getKey()
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
40 {
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
41 return null;
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
42 }
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
43
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
44 @Override
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
45 public ByteBuffer getValue()
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
46 {
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
47 return null;
4ff16d970ffc added getter to operations
Shoshi TAMAKI
parents: 50
diff changeset
48 }
16
35c661de095d added Parameter ... etc..
Shoshi TAMAKI
parents:
diff changeset
49 }