-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Plaisted
committed
Nov 20, 2020
1 parent
3e207d4
commit 35983bd
Showing
12 changed files
with
105 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
dao-api/src/main/java/com/linkedin/metadata/dao/equality/AlwaysFalseEqualityTester.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
package com.linkedin.metadata.dao.equality; | ||
|
||
import com.linkedin.data.template.DataTemplate; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import javax.annotation.Nonnull; | ||
|
||
|
||
/** | ||
* A {@link EqualityTester} that always returns false. | ||
*/ | ||
public class AlwaysFalseEqualityTester<T extends DataTemplate> implements EqualityTester<T> { | ||
public class AlwaysFalseEqualityTester<T extends RecordTemplate> implements EqualityTester<T> { | ||
private static final AlwaysFalseEqualityTester<?> INSTANCE = new AlwaysFalseEqualityTester<>(); | ||
|
||
/** | ||
* Creates a new instance of {@link AlwaysFalseEqualityTester}. | ||
* Returns the singleton instance of {@link AlwaysFalseEqualityTester}. | ||
*/ | ||
public static <CLASS extends DataTemplate> AlwaysFalseEqualityTester<CLASS> newInstance() { | ||
return new AlwaysFalseEqualityTester<>(); | ||
@SuppressWarnings("unchecked") | ||
public static <T extends RecordTemplate> AlwaysFalseEqualityTester<T> instance() { | ||
return (AlwaysFalseEqualityTester<T>) INSTANCE; | ||
} | ||
|
||
@Override | ||
public boolean equals(@Nonnull T o1, @Nonnull T o2) { | ||
public boolean equals(@Nonnull RecordTemplate o1, @Nonnull RecordTemplate o2) { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
dao-api/src/main/java/com/linkedin/metadata/dao/equality/EqualityTester.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.linkedin.metadata.dao.equality; | ||
|
||
import com.linkedin.data.template.DataTemplate; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import javax.annotation.Nonnull; | ||
|
||
|
||
/** | ||
* An interface for testing equality between two objects of the same type. | ||
*/ | ||
public interface EqualityTester<T extends DataTemplate> { | ||
public interface EqualityTester<T extends RecordTemplate> { | ||
|
||
boolean equals(@Nonnull T o1, @Nonnull T o2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.