class Antlr4::Runtime::Triple
Attributes
a[RW]
b[RW]
c[RW]
Public Class Methods
new(a, b, c)
click to toggle source
# File lib/antlr4/runtime/triple.rb, line 7 def initialize(a, b, c) @a = a @b = b @c = c end
Public Instance Methods
eql?(obj)
click to toggle source
# File lib/antlr4/runtime/triple.rb, line 13 def eql?(obj) if obj == self return true else return false unless obj.is_a? Triple end ObjectEqualityComparator.instance.compare(a, obj.a).zero? && ObjectEqualityComparator.instance.compare(b, obj.b).zero? && ObjectEqualityComparator.instance.compare(c, obj.c).zero? end
hash()
click to toggle source
# File lib/antlr4/runtime/triple.rb, line 23 def hash hash_code = RumourHash.hash([@a, @b, @c]) unless @_hash.nil? if hash_code == @_hash puts 'Same hash_code for Triple' else puts 'Different hash_code for Triple' end end @_hash = hash_code end
to_s()
click to toggle source
# File lib/antlr4/runtime/triple.rb, line 36 def to_s '(' << @a.to_s << ',' << @b.to_s << ', ' << @c.to_s << ')' end