Skip to content

Commit

Permalink
Removed defunct 'evaluator'
Browse files Browse the repository at this point in the history
Added docs to the public member variables and classes
  • Loading branch information
rob-baillie-ortoo committed Feb 22, 2022
1 parent d4d8519 commit 9323e95
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
*/
public with sharing class fflib_Comparator
{
// TODO: move - consider adding to the original library
public interface Evaluatable
{
Object toValue();
}

public interface Comparable
{
Expand Down Expand Up @@ -64,13 +59,8 @@ public with sharing class fflib_Comparator
public static Integer compare(Object object1, Object object2)
{
// TODO: test
if ( object2 instanceOf fflib_Comparator.Comparable ) {
return ((fflib_Comparator.Comparable)object2).compare( object1 );
}

// TODO: test
if ( object2 instanceOf Evaluatable ) {
object2 = ((Evaluatable)object2)?.toValue();
if ( object2 instanceOf Comparable ) {
return ((Comparable)object2).compare( object1 );
}

if (object1 == null && object2 == null)
Expand Down
Loading

0 comments on commit 9323e95

Please sign in to comment.