public class ConstraintFormula
extends java.lang.Object
A constraint formula, as they are described in chapter 18 of that Java 8 language specification.
Roughly, a constraint formula describes an assertion of compatibility between
two types, with respect to a particular constraining relationship. This
relationship may be reduced into a number of secondary, tertiary, etc.
constraint formulae, and then ultimately into a number of bounds, which in
turn may be incorporated into a BoundSet.
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstraintFormula.Kind
The kind of a constraint formula describes the nature of the constraint it
represents.
|
| Constructor and Description |
|---|
ConstraintFormula(ConstraintFormula.Kind kind,
java.lang.reflect.Type from,
java.lang.reflect.Type to) |
| Modifier and Type | Method and Description |
|---|---|
BoundSet |
reduce(BoundSet bounds)
Creates a
ConstraintFormula and reduces it into the given
BoundSet. |
protected void |
reduceInPlace(BoundSet bounds) |
java.lang.String |
toString() |
public ConstraintFormula(ConstraintFormula.Kind kind, java.lang.reflect.Type from, java.lang.reflect.Type to)
kind - the kind of the constraint formula to createfrom - the first type of the constraint formulato - the second type of the constraint formulapublic java.lang.String toString()
toString in class java.lang.Objectpublic BoundSet reduce(BoundSet bounds)
ConstraintFormula and reduces it into the given
BoundSet.bounds - the bound set to reduce the created constraint formula intoprotected void reduceInPlace(BoundSet bounds)