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:
parent
a4a0086f47
commit
65b5dc69db
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue