Interface ObjIntRelation<S>

Type Parameters:
S - The type of the subject of the relation
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ObjIntRelation<S>
Defines some kind of relationship between an object and an integer. For example, if x is an int[] array containing 6, and y equals 6, then the contain-elements relation exists between x and y. See the package description for more information.

This interface is included for completeness and because it represents the converse of the IntObjRelation. ObjectCheck and IntCheck do not currently support checks in the form of an ObjIntRelation and the CommonChecks does not define any.

Author:
Ayco Holleman
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default IntObjRelation<S>
    Returns the converse of this relation, swapping subject and object in the relationship.
    boolean
    exists(S subject, int object)
    Whether this ObjIntRelation is found to exist between the provided subject and object.
    default ObjIntRelation<S>
    Returns the negation of the this ObjIntRelation.
  • Method Details

    • converse

      default IntObjRelation<S> converse()
      Returns the converse of this relation, swapping subject and object in the relationship. Thus, the converse of an ObjIntRelation is an IntObjRelation.
      Returns:
      an IntObjRelation that is the converse of this ObjIntRelation.
    • negate

      default ObjIntRelation<S> negate()
      Returns the negation of the this ObjIntRelation.
      Returns:
      the negation of the this ObjIntRelation
    • exists

      boolean exists(S subject, int object)
      Whether this ObjIntRelation is found to exist between the provided subject and object.
      Parameters:
      subject - The subject of the relation (the entity from which the relationship extends)
      object - The object of the relation (the entity to which the relationship extends)
      Returns:
      true if the relation exists, false otherwise.