- Type Parameters:
S
- the type of the subject of the relationO
- 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.
Defines a relationship between two objects. For example, if x is a
Map
and
y is a String
appearing as a key in that Map
, then the
contains-key relation exists between x and y. See the
package description for more information.- Author:
- Ayco Holleman
-
Method Summary
-
Method Details
-
converse
Returns the converse of this relation, swapping subject and object in the relationship. For example, the converse of x contains y is y contains x (or x is-element-of y).- Returns:
- the converse of this
Relation
-
negate
Returns the negation of thisRelation
.- Returns:
- the negation of this
Relation
-
exists
Determines whether the two arguments have the relation that the implementation attempts to establish.- Parameters:
subject
- The value to testobject
- The value to test it against- Returns:
true
if the relation exists,false
otherwise.
-