Package com.exedio.cope
Class Cope
- java.lang.Object
-
- com.exedio.cope.Cope
-
public final class Cope extends Object
Utility class for creating conditions.- Author:
- Ralf Wiebicke
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Condition
and(Condition... conditions)
static Condition
and(List<? extends Condition> conditions)
static <X> Condition
betweenAndCast(Function<X> function, Object lowerBound, Object upperBound)
static <E> Condition
equal(Function<E> function, E value)
static <X> Condition
equalAndCast(Function<X> function, Object value)
static Model
getModel(String name)
Deprecated.UseModelByString.get(String)
instead.static <X> CompareCondition<X>
greaterAndCast(Function<X> function, Object value)
static <X> CompareCondition<X>
greaterOrEqualAndCast(Function<X> function, Object value)
static <X> CompareCondition<X>
lessAndCast(Function<X> function, Object value)
static <X> CompareCondition<X>
lessOrEqualAndCast(Function<X> function, Object value)
static void
main(String[] args)
Deprecated.UseModelMain.main(String[])
instead.static <X> SetValue<X>
mapAndCast(Field<X> a, Object o)
static <E extends Number>
MultiplyView<E>multiply(NumberFunction<E> multiplier1, NumberFunction<E> multiplier2)
You may want to useMultiplyView.multiply(Function, Function)
instead, if you do not haveNumberFunction
s available.static <E extends Number>
MultiplyView<E>multiply(NumberFunction<E> multiplier1, NumberFunction<E> multiplier2, NumberFunction<E> multiplier3)
You may want to useMultiplyView.multiply(Function, Function, Function)
instead, if you do not haveNumberFunction
s available.static <E> Condition
notEqual(Function<E> function, E value)
static <X> Condition
notEqualAndCast(Function<X> function, Object value)
static Condition
or(Condition... conditions)
static Condition
or(List<? extends Condition> conditions)
static <E extends Number>
PlusView<E>plus(NumberFunction<E> addend1, NumberFunction<E> addend2)
You may want to usePlusView.plus(Function, Function)
instead, if you do not haveNumberFunction
s available.static <E extends Number>
PlusView<E>plus(NumberFunction<E> addend1, NumberFunction<E> addend2, NumberFunction<E> addend3)
You may want to usePlusView.plus(Function, Function, Function)
instead, if you do not haveNumberFunction
s available.static <X> void
setAndCast(Field<X> field, Item item, Object value)
static <E extends Number>
PlusView<E>sum(NumberFunction<E> addend1, NumberFunction<E> addend2)
Deprecated.renamed toplus(NumberFunction, NumberFunction)
.static <E extends Number>
PlusView<E>sum(NumberFunction<E> addend1, NumberFunction<E> addend2, NumberFunction<E> addend3)
Deprecated.static <X> X
verboseCast(Class<X> clazz, Object o)
Deprecated.UseCast.verboseCast(Class, Object)
instead.
-
-
-
Method Detail
-
plus
public static <E extends Number> PlusView<E> plus(NumberFunction<E> addend1, NumberFunction<E> addend2)
You may want to usePlusView.plus(Function, Function)
instead, if you do not haveNumberFunction
s available.
-
plus
public static <E extends Number> PlusView<E> plus(NumberFunction<E> addend1, NumberFunction<E> addend2, NumberFunction<E> addend3)
You may want to usePlusView.plus(Function, Function, Function)
instead, if you do not haveNumberFunction
s available.
-
multiply
public static <E extends Number> MultiplyView<E> multiply(NumberFunction<E> multiplier1, NumberFunction<E> multiplier2)
You may want to useMultiplyView.multiply(Function, Function)
instead, if you do not haveNumberFunction
s available.
-
multiply
public static <E extends Number> MultiplyView<E> multiply(NumberFunction<E> multiplier1, NumberFunction<E> multiplier2, NumberFunction<E> multiplier3)
You may want to useMultiplyView.multiply(Function, Function, Function)
instead, if you do not haveNumberFunction
s available.
-
setAndCast
public static <X> void setAndCast(Field<X> field, Item item, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
equalAndCast
public static <X> Condition equalAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
notEqualAndCast
public static <X> Condition notEqualAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
lessAndCast
public static <X> CompareCondition<X> lessAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
lessOrEqualAndCast
public static <X> CompareCondition<X> lessOrEqualAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
greaterAndCast
public static <X> CompareCondition<X> greaterAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
greaterOrEqualAndCast
public static <X> CompareCondition<X> greaterOrEqualAndCast(Function<X> function, Object value)
- Throws:
ClassCastException
- ifvalue</tt> is not assignable to <tt>X
-
betweenAndCast
public static <X> Condition betweenAndCast(Function<X> function, Object lowerBound, Object upperBound)
- Throws:
ClassCastException
- if one of thevalues</tt> is not assignable to <tt>X
-
sum
@Deprecated public static <E extends Number> PlusView<E> sum(NumberFunction<E> addend1, NumberFunction<E> addend2)
Deprecated.renamed toplus(NumberFunction, NumberFunction)
.
-
sum
@Deprecated public static <E extends Number> PlusView<E> sum(NumberFunction<E> addend1, NumberFunction<E> addend2, NumberFunction<E> addend3)
Deprecated.
-
verboseCast
@Deprecated public static <X> X verboseCast(Class<X> clazz, Object o)
Deprecated.UseCast.verboseCast(Class, Object)
instead.
-
getModel
@Deprecated public static Model getModel(String name)
Deprecated.UseModelByString.get(String)
instead.
-
main
@Deprecated public static void main(String[] args)
Deprecated.UseModelMain.main(String[])
instead.
-
-