Simplify branching.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@643952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2008-04-02 16:07:54 +00:00
parent a4a0086f47
commit 65b5dc69db
1 changed files with 5 additions and 8 deletions

View File

@ -167,16 +167,13 @@ public final class CharRange implements Serializable {
if (negated) {
if (range.negated) {
return start >= range.start && end <= range.end;
} else {
return range.end < start || range.start > end;
}
} else {
if (range.negated) {
return start == 0 && end == Character.MAX_VALUE;
} else {
return start <= range.start && end >= range.end;
}
return range.end < start || range.start > end;
}
if (range.negated) {
return start == 0 && end == Character.MAX_VALUE;
}
return start <= range.start && end >= range.end;
}
// Basics