Interface IntObjRelation<O>

Type Parameters:
O - the type of the object 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 IntObjRelation<O>
Defines a relationship between an integer and an object. For example, if x equals 6, and y is an int[] array containing 6, then the is-element-of relation exists between x and y. See the package description for more information.
Author:
Ayco Holleman
  • Method Summary

    Modifier and Type
    Method
    Description
    default ObjIntRelation<O>
    Returns the converse of this relation, swapping subject and object in the relationship.
    boolean
    exists(int subject, O object)
    Returns whether the relationship between subject and object exists.
    default IntObjRelation<O>
    Returns the negation of this IntObjRelation.
  • Method Details

    • converse

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

      default IntObjRelation<O> negate()
      Returns the negation of this IntObjRelation.
      Returns:
      the negation of this IntObjRelation
    • exists

      boolean exists(int subject, O object)
      Returns whether the relationship between subject and object exists.
      Parameters:
      subject - The value to test
      object - The value to test it against
      Returns:
      true if the relation exists, false otherwise