Class Distinct

  • All Implemented Interfaces:
    Evaluator

    public class Distinct
    extends Equals
    Compare two object and return true if the objects are distinct and false in other ways.
    Author:
    javaito
    • Constructor Detail

      • Distinct

        public Distinct​(java.lang.Object leftValue,
                        java.lang.Object rightValue)
    • Method Detail

      • evaluate

        public boolean evaluate​(java.lang.Object object,
                                Queryable.DataSource dataSource,
                                Queryable.Consumer consumer)
        Evaluate if the evaluator's value and the object's value in the specified field of the parameter instance are distinct. This method support any kind of object like field value and parameter value too.
        Specified by:
        evaluate in interface Evaluator
        Overrides:
        evaluate in class Equals
        Parameters:
        object - Instance to obtain the field value.
        dataSource - Data source
        consumer - Data source consumer
        Returns:
        True if the two values are distinct and false in other ways
        Throws:
        java.lang.IllegalArgumentException - If is impossible to get value from instance with introspection.