Class: AWS::Flow::DecisionID

Inherits:
Object
  • Object
show all
Defined in:
aws-flow-ruby/aws-flow/lib/aws/decider/async_decider.rb

Overview

Represents a decision ID.

Instance Method Summary (collapse)

Constructor Details

- (DecisionID) initialize(decision_target, string_id)

Creates a new decision ID.

Parameters:

  • decision_target

    The decision target.

  • string_id

    The string that identifies this decision.



30
31
32
33
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/async_decider.rb', line 30

def initialize(decision_target, string_id)
  @decision_target = decision_target
  @string_id = string_id
end

Instance Method Details

- (true, false) eql?(other)

Is this decision ID the same as another?

Parameters:

  • other (Object)

    The object to compare with.

Returns:

  • (true, false)

    Returns true if the object is the same as this decision ID; false otherwise.



56
57
58
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/async_decider.rb', line 56

def eql?(other)

end

- (Object) hash

Hash function to return an unique value for the decision ID.

Returns:

  • The calculated hash value for the decision ID.



40
41
42
43
44
45
46
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/async_decider.rb', line 40

def hash
  prime = 31
  result = 1
  result = result * prime + (@decision_target == nil ? 0 : @decision_target.hash)
  result = prime * result + (@string_id == nil ? 0 : @string_id.hash)
  result
end