Skip to content

Commit 6722b58

Browse files
committed
Checkstyle
1 parent f9d3dd7 commit 6722b58

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src/main/java/org/mybatis/dynamic/sql/AbstractListValueCondition.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ protected S filter(Predicate<T> predicate, BiFunction<Collection<T>, Callback, S
7575
}
7676
}
7777

78-
protected S map(UnaryOperator<T> mapper, BiFunction<Collection<T>, Callback, S> constructor, S self) {
79-
if (shouldRender()) {
80-
return constructor.apply(applyMapper(mapper), emptyCallback);
81-
} else {
82-
return self;
83-
}
84-
}
85-
8678
/**
8779
* If renderable, apply the predicate to each value in the list and return a new condition with the filtered values.
8880
* Else returns a condition that will not render (this). If all values are filtered out of the value
@@ -94,6 +86,14 @@ protected S map(UnaryOperator<T> mapper, BiFunction<Collection<T>, Callback, S>
9486
*/
9587
public abstract S filter(Predicate<T> predicate);
9688

89+
protected S map(UnaryOperator<T> mapper, BiFunction<Collection<T>, Callback, S> constructor, S self) {
90+
if (shouldRender()) {
91+
return constructor.apply(applyMapper(mapper), emptyCallback);
92+
} else {
93+
return self;
94+
}
95+
}
96+
9797
/**
9898
* If renderable, apply the mapping to each value in the list return a new condition with the mapped values.
9999
* Else return a condition that will not render (this).

src/main/java/org/mybatis/dynamic/sql/AbstractSingleValueCondition.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ protected S filter(Predicate<T> predicate, Supplier<S> empty, S self) {
4545
}
4646
}
4747

48-
protected S map(UnaryOperator<T> mapper, Function<T, S> constructor, S self) {
49-
if (shouldRender()) {
50-
return constructor.apply(mapper.apply(value));
51-
}else {
52-
return self;
53-
}
54-
}
55-
5648
/**
5749
* If renderable and the value matches the predicate, returns this condition. Else returns a condition
5850
* that will not render.
@@ -63,6 +55,14 @@ protected S map(UnaryOperator<T> mapper, Function<T, S> constructor, S self) {
6355
*/
6456
public abstract S filter(Predicate<T> predicate);
6557

58+
protected S map(UnaryOperator<T> mapper, Function<T, S> constructor, S self) {
59+
if (shouldRender()) {
60+
return constructor.apply(mapper.apply(value));
61+
} else {
62+
return self;
63+
}
64+
}
65+
6666
/**
6767
* If renderable, apply the mapping to the value and return a new condition with the new value. Else return a
6868
* condition that will not render (this).

src/main/java/org/mybatis/dynamic/sql/AbstractTwoValueCondition.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ protected S filter(BiPredicate<T, T> predicate, Supplier<S> empty, S self) {
5151
}
5252
}
5353

54-
protected S map(UnaryOperator<T> mapper1, UnaryOperator<T> mapper2, BiFunction<T, T, S> constructor, S self) {
55-
if (shouldRender()) {
56-
return constructor.apply(mapper1.apply(value1), mapper2.apply(value2));
57-
}else {
58-
return self;
59-
}
60-
}
61-
6254
/**
6355
* If renderable and the values match the predicate, returns this condition. Else returns a condition
6456
* that will not render.
@@ -69,6 +61,14 @@ protected S map(UnaryOperator<T> mapper1, UnaryOperator<T> mapper2, BiFunction<T
6961
*/
7062
public abstract S filter(BiPredicate<T, T> predicate);
7163

64+
protected S map(UnaryOperator<T> mapper1, UnaryOperator<T> mapper2, BiFunction<T, T, S> constructor, S self) {
65+
if (shouldRender()) {
66+
return constructor.apply(mapper1.apply(value1), mapper2.apply(value2));
67+
} else {
68+
return self;
69+
}
70+
}
71+
7272
/**
7373
* If renderable, apply the mappings to the values and return a new condition with the new values. Else return a
7474
* condition that will not render (this).

0 commit comments

Comments
 (0)