Modifier and Type | Field and Description |
---|---|
static Dnf |
NONEXISTENT
Designates a non-existent result for a DNF expression.
|
static Dnf |
UNDEFINED
Designates an undefined result for a DNF expression.
|
Constructor and Description |
---|
Dnf()
Creates a new Dnf instance.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
defined(Dnf dnf)
Returns true if at least one alternative is defined for this schema.
|
static boolean |
exists(Dnf dnf)
Returns false if the given schema is a non-existent result.
|
List<io.swagger.v3.oas.models.media.Schema<?>> |
getAlternatives()
Returns the alternatives of all types.
|
List<io.swagger.v3.oas.models.media.Schema<?>> |
getAlternatives(String type)
Returns the alternatives for the given type.
|
List<io.swagger.v3.oas.models.media.Schema<?>> |
getCompatibleAlternatives(String type)
Returns the alternatives that can be combined with schemas of the given type.
|
Set<String> |
getTypes()
Returns the types of instances that can be validated by this schema.
|
static Dnf |
of(Iterable<io.swagger.v3.oas.models.media.Schema<?>> alternatives)
Returns the disjunctive normal form with the given alternatives.
|
static Dnf |
of(io.swagger.v3.oas.models.media.Schema<?>... alternatives)
Returns the disjunctive normal form with the given alternatives.
|
static Dnf |
of(Stream<io.swagger.v3.oas.models.media.Schema<?>> alternatives)
Returns the disjunctive normal form with the given alternatives.
|
String |
toString() |
static boolean |
undefined(Dnf dnf)
Returns false if at least one alternative is defined for this schema.
|
static boolean |
unsatisfiable(Dnf dnf)
Returns true if the given schema is unsatisfiable by any instance.
|
public static final Dnf NONEXISTENT
public static final Dnf UNDEFINED
public List<io.swagger.v3.oas.models.media.Schema<?>> getAlternatives(String type)
public List<io.swagger.v3.oas.models.media.Schema<?>> getCompatibleAlternatives(String type)
public List<io.swagger.v3.oas.models.media.Schema<?>> getAlternatives()
public Set<String> getTypes()
public static boolean unsatisfiable(Dnf dnf)
public static boolean exists(Dnf dnf)
public static boolean undefined(Dnf dnf)
public static boolean defined(Dnf dnf)
public static Dnf of(io.swagger.v3.oas.models.media.Schema<?>... alternatives)
public static Dnf of(Iterable<io.swagger.v3.oas.models.media.Schema<?>> alternatives)
public static Dnf of(Stream<io.swagger.v3.oas.models.media.Schema<?>> alternatives)
Copyright © 2024 The Cornutum Project. All rights reserved.