Skip to content

Commit

Permalink
Renamed soft comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Aug 22, 2016
1 parent 837961c commit 8992193
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


dependencies {
compile 'com.github.neurospeech:android-hypercube:v1.4.11'
compile 'com.github.neurospeech:android-hypercube:v1.4.12'
}


Expand Down
4 changes: 2 additions & 2 deletions hypercube/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1411
versionName "1.4.11"
versionCode 1412
versionName "1.4.12"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ public void clear(){
}


public Comparator<? super T> getComparator() {
return comparator;
public Comparator<? super T> getSortComparator() {
return sortComparator;
}

/**
*
* @param comparator
* Here we need to just store the Comparator i.e. fields on which we have to sort
*/
public void setComparator(Comparator<? super T> comparator) {
this.comparator = comparator;
public void setSortComparator(Comparator<? super T> comparator) {
this.sortComparator = comparator;
}

private Comparator<? super T> comparator;
private Comparator<? super T> sortComparator;

/**
* This method is used to identify whether it is header or item and accordingly will regroup items based on header
Expand All @@ -104,10 +104,10 @@ protected void recreate() {
int i =0;

/**
* If comparator is set, then we sort the list before recreating it
* If sortComparator is set, then we sort the list before recreating it
*/
if (comparator != null) {
Collections.sort(source,comparator);
if (sortComparator != null) {
Collections.sort(source, sortComparator);
}

for (T item : source){
Expand Down

0 comments on commit 8992193

Please sign in to comment.