summaryrefslogtreecommitdiff
path: root/java/util/BitSet.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-10 20:25:39 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-10 20:25:39 +0000
commitda66af5951b18b6f5e8752cbbe11f5f842332a33 (patch)
treea28e126d1415e3689be6c7b2c2d061ae51194195 /java/util/BitSet.java
parentab90923ee693a17e2e0e37b6ba5a84794c9236de (diff)
downloadclasspath-da66af5951b18b6f5e8752cbbe11f5f842332a33.tar.gz
2006-12-10 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of generics-branch to HEAD (woohoo!)
Diffstat (limited to 'java/util/BitSet.java')
-rw-r--r--java/util/BitSet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/util/BitSet.java b/java/util/BitSet.java
index f1b5aaa06..e4f923b7f 100644
--- a/java/util/BitSet.java
+++ b/java/util/BitSet.java
@@ -741,4 +741,15 @@ public class BitSet implements Cloneable, Serializable
bits = nd;
}
}
+
+ // This is used by EnumSet for efficiency.
+ final boolean containsAll(BitSet other)
+ {
+ for (int i = other.bits.length - 1; i >= 0; i--)
+ {
+ if ((bits[i] & other.bits[i]) != other.bits[i])
+ return false;
+ }
+ return true;
+ }
}