Updating to java 5 foreach - LANG-336
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@772539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73ac4a0289
commit
3d2c545acb
|
@ -19,7 +19,6 @@ package org.apache.commons.lang;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -243,8 +242,7 @@ public class CharSet implements Serializable {
|
||||||
* @return <code>true</code> if the set contains the characters
|
* @return <code>true</code> if the set contains the characters
|
||||||
*/
|
*/
|
||||||
public boolean contains(char ch) {
|
public boolean contains(char ch) {
|
||||||
for (Iterator<CharRange> it = set.iterator(); it.hasNext();) {
|
for (CharRange range : set) {
|
||||||
CharRange range = it.next();
|
|
||||||
if (range.contains(ch)) {
|
if (range.contains(ch)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue