Skip to content

Commit

Permalink
Merge pull request #71 from zeenea/NO-JIRA/add_operation_functions
Browse files Browse the repository at this point in the history
[NO-JIRA] Add missing functions for Operation
  • Loading branch information
martin-guerre authored Dec 12, 2024
2 parents 7a45965 + 08ae67f commit 42ca4fa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions src/main/java/zeenea/connector/process/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.jetbrains.annotations.NotNull;
import zeenea.connector.common.ItemReference;
import zeenea.connector.exception.ExceptionUtils;
Expand Down Expand Up @@ -45,6 +46,40 @@ private Operation(Builder builder) {
return targets;
}

/**
* Checks if this Operation is equal to another object.
*
* @param o the object to compare with
* @return true if this Operation is equal to the specified object, otherwise false
*/
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Operation operation = (Operation) o;
return Objects.equals(sources, operation.sources) && Objects.equals(targets, operation.targets);
}

/**
* Computes the hash code for this Operation.
*
* @return the hash code of this Operation
*/
@Override
public int hashCode() {
return Objects.hash(sources, targets);
}

/**
* Returns a string representation of this Operation.
*
* @return a string representation of this Operation
*/
@Override
public String toString() {
return "Operation{" + "sources=" + sources + ", targets=" + targets + '}';
}

/**
* Creates a new Builder instance for constructing a Operation.
*
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.2.2

0 comments on commit 42ca4fa

Please sign in to comment.