Class: ZZQ::Routing::TopicTrie::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/zzq/routing/topic_trie.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNode

Returns a new instance of Node.



36
37
38
39
40
41
# File 'lib/zzq/routing/topic_trie.rb', line 36

def initialize
  @children   = {}
  @plus_child = nil
  @hash_child = nil
  @entries    = []
end

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



33
34
35
# File 'lib/zzq/routing/topic_trie.rb', line 33

def children
  @children
end

#entriesObject (readonly)

Returns the value of attribute entries.



33
34
35
# File 'lib/zzq/routing/topic_trie.rb', line 33

def entries
  @entries
end

#hash_childObject

Returns the value of attribute hash_child.



32
33
34
# File 'lib/zzq/routing/topic_trie.rb', line 32

def hash_child
  @hash_child
end

#plus_childObject

Returns the value of attribute plus_child.



32
33
34
# File 'lib/zzq/routing/topic_trie.rb', line 32

def plus_child
  @plus_child
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/zzq/routing/topic_trie.rb', line 44

def empty?
  @children.empty? && @plus_child.nil? && @hash_child.nil? && @entries.empty?
end