class DEBUGGER__::AbbrevCommand::TrieNode

def [](c)

def [](c)
  @children[c]
end

def add_type type

def add_type type
  @types[type] = true
  self
end

def append c, type

def append c, type
  trie = (@children[c] ||= TrieNode.new)
  trie.add_type type
end

def candidates

def candidates
  @children.map{|c, n|
    ss = n.candidates
    ss.empty? ? c :
    ss.map{|s|
      c+s
    }
  }.flatten
end

def initialize

def initialize
  @children = {}
  @types = {} # set
end

def type

def type
  if @types.size == 1
    @types.keys.first
  else
    nil
  end
end

def types

def types
  @types.keys
end