Remove redundant conditional statements

This commit is contained in:
Zafar Khaja 2013-10-29 21:47:10 +04:00
parent 9ce1a0b063
commit d0f98e3130
3 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ class MetadataVersion implements Comparable<MetadataVersion> {
if (!(other instanceof MetadataVersion)) {
return false;
}
return compareTo((MetadataVersion) other) == 0 ? true : false;
return compareTo((MetadataVersion) other) == 0;
}
@Override

View File

@ -106,7 +106,7 @@ class NormalVersion implements Comparable<NormalVersion> {
if (!(other instanceof NormalVersion)) {
return false;
}
return compareTo((NormalVersion) other) == 0 ? true : false;
return compareTo((NormalVersion) other) == 0;
}
@Override

View File

@ -242,19 +242,19 @@ public class Version implements Comparable<Version> {
}
public boolean greaterThan(Version other) {
return compareTo(other) > 0 ? true : false;
return compareTo(other) > 0;
}
public boolean greaterThanOrEqualTo(Version other) {
return compareTo(other) >= 0 ? true : false;
return compareTo(other) >= 0;
}
public boolean lessThan(Version other) {
return compareTo(other) < 0 ? true : false;
return compareTo(other) < 0;
}
public boolean lessThanOrEqualTo(Version other) {
return compareTo(other) <= 0 ? true : false;
return compareTo(other) <= 0;
}
@Override
@ -265,7 +265,7 @@ public class Version implements Comparable<Version> {
if (!(other instanceof Version)) {
return false;
}
return compareTo((Version) other) == 0 ? true : false;
return compareTo((Version) other) == 0;
}
@Override