Here you can find the source of isSubSet(BitSet x, BitSet y)
Parameter | Description |
---|---|
x | a parameter |
y | a parameter |
public static boolean isSubSet(BitSet x, BitSet y)
//package com.java2s; //License from project: LGPL import java.util.BitSet; public class Main { /**//from ww w. j a va 2 s. c om * very inefficient, but Java wonderful bitset has no subset op * perhaps using bit iterator would be faster, I can't be bothered. * @param x * @param y * @return */ public static boolean isSubSet(BitSet x, BitSet y) { y = (BitSet) y.clone(); y.and(x); return y.equals(x); } }