forked from ddrilling/AsbCloudServer
34 lines
652 B
C#
34 lines
652 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp
|
|
{
|
|
public class Tree<T> : Dictionary<T, Tree<T>>
|
|
{
|
|
public Tree()
|
|
{}
|
|
|
|
public Tree(T key, Tree<T> node = null)
|
|
{
|
|
Add(key, node);
|
|
}
|
|
|
|
public Tree(Tree<T> other)
|
|
:base(other)
|
|
{}
|
|
|
|
public Tree(IEnumerable<T> keys)
|
|
{
|
|
foreach (var key in keys)
|
|
Add(key);
|
|
}
|
|
|
|
public void Add(T key) => Add(key, null);
|
|
}
|
|
}
|