Skip to content

Commit

Permalink
Implement Comparable for DEI.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeiklejohn committed Jul 5, 2023
1 parent 2dd9c46 commit 5d913d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import cloud.filibuster.instrumentation.datatypes.Callsite;

public interface DistributedExecutionIndex extends Cloneable {
public interface DistributedExecutionIndex extends Cloneable, Comparable<DistributedExecutionIndex> {

DistributedExecutionIndexKey convertCallsiteToDistributedExecutionIndexKey(Callsite callsite);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import cloud.filibuster.instrumentation.datatypes.Callsite;
import cloud.filibuster.instrumentation.datatypes.CallsiteArguments;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Map;
Expand Down Expand Up @@ -36,6 +37,11 @@
public class DistributedExecutionIndexV1 extends DistributedExecutionIndexBase implements DistributedExecutionIndex {
public static final DistributedExecutionIndexType VERSION = V1;

@Override
public int compareTo(@NotNull DistributedExecutionIndex o) {
return this.toString().compareTo(o.toString());
}

public static class Properties {

public static class TestScope {
Expand Down

0 comments on commit 5d913d4

Please sign in to comment.