Class: Antlr4::Runtime::FlexibleHashMap::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/antlr4/runtime/flexible_hash_map.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Entry



11
12
13
14
# File 'lib/antlr4/runtime/flexible_hash_map.rb', line 11

def initialize(key, value)
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject

Returns the value of attribute key



8
9
10
# File 'lib/antlr4/runtime/flexible_hash_map.rb', line 8

def key
  @key
end

#valueObject

Returns the value of attribute value



9
10
11
# File 'lib/antlr4/runtime/flexible_hash_map.rb', line 9

def value
  @value
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/antlr4/runtime/flexible_hash_map.rb', line 16

def to_s
  @key.to_s << ':' << @value.to_s
end