mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-07 18:48:39 +00:00
Boolean comparisons in CharRange (closes #289)
Cleaned up comparisons to false to just use the boolean negation operator (!).
This commit is contained in:
parent
1406f2a4f2
commit
7076b7408f
@ -206,7 +206,7 @@ public boolean equals(final Object obj) {
|
|||||||
if (obj == this) {
|
if (obj == this) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (obj instanceof CharRange == false) {
|
if (!(obj instanceof CharRange)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final CharRange other = (CharRange) obj;
|
final CharRange other = (CharRange) obj;
|
||||||
@ -335,7 +335,7 @@ public boolean hasNext() {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Character next() {
|
public Character next() {
|
||||||
if (hasNext == false) {
|
if (!hasNext) {
|
||||||
throw new NoSuchElementException();
|
throw new NoSuchElementException();
|
||||||
}
|
}
|
||||||
final char cur = current;
|
final char cur = current;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user