Mercurial > hg > Database > jungle-sharp
comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkAppendChildAtOperation.cs @ 17:01a08cf4b2d9
Liq Files
author | Kazuma |
---|---|
date | Mon, 07 Nov 2016 01:05:24 +0900 |
parents | b71d9ea6bd8e |
children |
comparison
equal
deleted
inserted
replaced
16:8f1ce942abfc | 17:01a08cf4b2d9 |
---|---|
1 using UnityEngine; | |
2 using System.Collections; | |
3 | |
4 public class NetworkAppendChildAtOperation : NodeOperation { | |
5 | |
6 private int Position; | |
7 | |
8 public NetworkAppendChildAtOperation() { | |
9 this.Position = -2; | |
10 } | |
11 | |
12 public NetworkAppendChildAtOperation(int pos){ | |
13 this.Position = pos; | |
14 } | |
15 | |
16 public Command getCommand() { | |
17 return Command.APPEND_CHILD; | |
18 } | |
19 | |
20 public Either<Error, TreeNode> invoke (TreeNode target) { | |
21 return target.getChildren().addNewChildAt(this.Position); | |
22 } | |
23 | |
24 public int getPosition () { | |
25 return this.Position; | |
26 } | |
27 | |
28 public string getKey() { | |
29 return null; | |
30 } | |
31 | |
32 public byte[] getValue() { | |
33 return null; | |
34 } | |
35 } |