Interface IntRelation

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 IntRelation
Defines a relationship between two integers. For example, if x equals 5 and y equals 3, then the is-greater-than relation exists between x and y. See the package description for more information.
Author:
Ayco Holleman
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default IntRelation
    Returns the converse of this relation, swapping subject and object in the relationship.
    boolean
    exists(int subject, int object)
    Determines whether subject relates to object in the manner defined by this IntRelation.
    default IntRelation
    Returns the negation of this IntRelation.
  • Method Details

    • converse

      default IntRelation converse()
      Returns the converse of this relation, swapping subject and object in the relationship. For example, the converse of x > y is y > x (or x <= y).
      Returns:
      the converse of this IntRelation
    • negate

      default IntRelation negate()
      Returns the negation of this IntRelation. For example, the negation of x > y is x <= y.
      Returns:
      the negation of this IntRelation
    • exists

      boolean exists(int subject, int object)
      Determines whether subject relates to object in the manner defined by this IntRelation.
      Parameters:
      subject - The value to test
      object - The value to test it against
      Returns:
      true if the relation exists, false otherwise.