class JavaClass::Dependencies::Edge
An edge in the Graph
of dependencies. An edge knows it's source and destination details.
- Author
-
Peter Kofler
Attributes
source[R]
target[R]
Public Class Methods
new(source, target)
click to toggle source
# File lib/javaclass/dependencies/edge.rb, line 11 def initialize(source, target) @source = source @target = target end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/javaclass/dependencies/edge.rb, line 30 def <=>(other) res = @target <=> other.target if res == 0 res = @source <=> other.source end res end
==(other)
click to toggle source
# File lib/javaclass/dependencies/edge.rb, line 20 def ==(other) @source == other.source && @target == other.target end
Also aliased as: eql?
hash()
click to toggle source
# File lib/javaclass/dependencies/edge.rb, line 26 def hash [@source, @target].hash end
to_s()
click to toggle source
# File lib/javaclass/dependencies/edge.rb, line 16 def to_s "#{@target} (#{@source})" end