This commit is contained in:
RedKale
2016-06-23 09:21:18 +08:00
parent 27b8daa587
commit 1cd014e7c9

View File

@@ -104,6 +104,7 @@ public final class Flipper implements Serializable, Cloneable {
return sort; return sort;
} }
@Deprecated
public Flipper putSortIfEmpty(String sort) { public Flipper putSortIfEmpty(String sort) {
if (this.sort == null || this.sort.isEmpty()) { if (this.sort == null || this.sort.isEmpty()) {
this.sort = sort; this.sort = sort;
@@ -111,6 +112,13 @@ public final class Flipper implements Serializable, Cloneable {
return this; return this;
} }
public Flipper sortIfEmpty(String sort) {
if (this.sort == null || this.sort.isEmpty()) {
this.sort = sort;
}
return this;
}
public void setSort(String sort) { public void setSort(String sort) {
if (sort != null) { if (sort != null) {
this.sort = sort.trim(); this.sort = sort.trim();