Package org.modelmapper
Class Conditions
- java.lang.Object
-
- org.modelmapper.Conditions
-
-
Constructor Summary
Constructors Constructor Description Conditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S,D>
Condition<S,D>and(Condition<S,D> condition1, Condition<S,D> condition2)
Returns a new condition that applies ifcondition1
ANDcondition2
apply.static Condition<?,?>
isNotNull()
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<?,?>
isType(Class<?> type)
Returns a condition that applies when the mapping source is of the typetype
.static <S,D>
Condition<S,D>not(Condition<S,D> condition)
Returns a condition that does NOT apply when the givencondition
applies.static <S,D>
Condition<S,D>or(Condition<S,D> condition1, Condition<S,D> condition2)
Returns a new condition that applies ifcondition1
ORcondition2
apply.
-
-
-
Method Detail
-
and
public static <S,D> Condition<S,D> and(Condition<S,D> condition1, Condition<S,D> condition2)
Returns a new condition that applies ifcondition1
ANDcondition2
apply.- Returns:
- new condition
- Throws:
IllegalArgumentException
- ifcondition1
orcondition2
is null
-
isNotNull
public static Condition<?,?> isNotNull()
Returns a condition that applies when the mapping source is notnull
.
-
isNull
public static Condition<?,?> isNull()
Returns a condition that applies when the mapping source isnull
.
-
isType
public static Condition<?,?> isType(Class<?> type)
Returns a condition that applies when the mapping source is of the typetype
.
-
not
public static <S,D> Condition<S,D> not(Condition<S,D> condition)
Returns a condition that does NOT apply when the givencondition
applies.- Throws:
IllegalArgumentException
- ifcondition
is null
-
or
public static <S,D> Condition<S,D> or(Condition<S,D> condition1, Condition<S,D> condition2)
Returns a new condition that applies ifcondition1
ORcondition2
apply.- Returns:
- new condition
- Throws:
IllegalArgumentException
- ifcondition1
orcondition2
is null
-
-