/**
* Applies this function to the given argument.
* function do function
*
* @param accountId ->id
* @param judge ->test
* @param find ->apply
* @param excute ->apply
* @param set ->accept
* @param get ->get
* @return T
*/
private static T apply4(String accountId,
Predicate judge,
Function find,
Function excute,
Consumer set,
Supplier get) {
T t = null;
if (judge.test(accountId)) {
t = find.andThen(excute).apply(accountId);
set.accept(t);
t = get.get();
} else {
System.out.println("");
}
return t;
}
/**
*
*/
protected T etract(Object V, Function etract) {
return etract.apply(V);
}
/**
*
*/
private static T applyWhile(
Object object,
Predicate judge,
Function excute) {
T t = excute.apply(object);
while (judge.test(t)) {
t = excute.apply(t);
}
return t;
}
/**
* 2
*/
protected static T apply2excute(Object V, Object V2, BiFunction excute) {
return excute.apply(V, V2);
}
/**
comparator : , Collections.sort Arrays.sort .
int compare(T o1, T o2); , , , , ,
*/
private static T apply5(String accountId,
Predicate judge,
Function find,
Function excute,
Consumer set,
Supplier get,
Comparator comparator) {
T t = null;
if (judge.test(accountId)) {
t = find.andThen(excute).apply(accountId);
set.accept(t);
T t2 = get.get();
int i=comparator.compare(t,t2);
if(0