Package org.modelmapper
Class Conditions
java.lang.Object
org.modelmapper.Conditions
Condition
utilities and implementations. This class can be extended by a PropertyMap to
provide convenient access to methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
D> Condition<S, D> Returns a new condition that applies ifcondition1
ANDcondition2
apply.static Condition<?,
?> Returns a condition that applies when the mapping source is notnull
.static Condition<?,
?> isNull()
Returns a condition that applies when the mapping source isnull
.static Condition<?,
?> Returns a condition that applies when the mapping source is of the typetype
.static <S,
D> Condition<S, D> Returns a condition that does NOT apply when the givencondition
applies.static <S,
D> Condition<S, D> Returns a new condition that applies ifcondition1
ORcondition2
apply.
-
Constructor Details
-
Conditions
public Conditions()
-
-
Method Details
-
and
Returns a new condition that applies ifcondition1
ANDcondition2
apply.- Returns:
- new condition
- Throws:
IllegalArgumentException
- ifcondition1
orcondition2
is null
-
isNotNull
Returns a condition that applies when the mapping source is notnull
. -
isNull
Returns a condition that applies when the mapping source isnull
. -
isType
Returns a condition that applies when the mapping source is of the typetype
. -
not
Returns a condition that does NOT apply when the givencondition
applies.- Throws:
IllegalArgumentException
- ifcondition
is null
-
or
Returns a new condition that applies ifcondition1
ORcondition2
apply.- Returns:
- new condition
- Throws:
IllegalArgumentException
- ifcondition1
orcondition2
is null
-