nz.co.gregs.dbvolution.results.EqualComparable Maven / Gradle / Ivy
/*
* Copyright 2014 gregory.graham.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nz.co.gregs.dbvolution.results;
import nz.co.gregs.dbvolution.expressions.BooleanExpression;
import nz.co.gregs.dbvolution.expressions.DBExpression;
/**
* Indicates that the class can be compared to other instances of this class as
* if the instances were equivalent.
*
*
* EqualsComparable expressions must have an equivalent to the EQUALS (=)
* operation.
*
*
Support DBvolution at
* Patreon
*
* @author Gregory Graham
* @param
* @param the class that can be compared using the "=" operator
*
*/
public interface EqualComparable extends AnyComparable{
/**
* Creates a {@link BooleanExpression} that compares the 2 values using the
* EQUALS operation.
*
* @param anotherInstance an instance to compare to
* Support DBvolution at
* Patreon
* @return a BooleanExpression
*/
public BooleanExpression is(A anotherInstance);
/**
* Creates a {@link BooleanExpression} that compares the 2 values using the
* NOT EQUALS operation.
*
* @param anotherInstance and instance to compare to
* Support DBvolution at
* Patreon
* @return a BooleanExpression
*/
public BooleanExpression isNot(A anotherInstance);
/**
* Creates a {@link BooleanExpression} that compares the 2 values using the
* EQUALS operation.
*
* @param anotherInstance an instance to compare to
* Support DBvolution at
* Patreon
* @return a BooleanExpression
*/
public BooleanExpression is(B anotherInstance);
/**
* Creates a {@link BooleanExpression} that compares the 2 values using the
* NOT EQUALS operation.
*
* @param anotherInstance and instance to compare to
* Support DBvolution at
* Patreon
* @return a BooleanExpression
*/
public BooleanExpression isNot(B anotherInstance);
}