20
|
1 using UnityEngine;
|
|
2 using System.Collections;
|
|
3 using System;
|
|
4
|
|
5 namespace JungleDB {
|
|
6 public class ReplaceRootNodeOperation : NodeOperation {
|
|
7
|
|
8 public Command getCommand() {
|
|
9 return Command.REPLACE_ROOT;
|
|
10 }
|
|
11
|
|
12 public Either<Error, TreeNode> invoke(TreeNode target) {
|
|
13 return target.appendRootNode();
|
|
14 }
|
|
15
|
|
16 public int getPosition() {
|
|
17 return -1;
|
|
18 }
|
|
19
|
|
20 public string getKey() {
|
|
21 return null;
|
|
22 }
|
|
23
|
|
24 public byte[] getValue() {
|
|
25 return new byte[1]{0};
|
|
26 }
|
|
27 }
|
|
28 }
|