class EnumValuePartitioner {

	public static List<BitGroup> partition(long[] values) {
		List<BitGroup> list = new LinkedList<>();
		long totalMask = 0;
		for (long value : values) {
			totalMask |= value;
			BitGroup bitGroup = new BitGroup(value);
			merge(list, bitGroup);
		}
		// now create a BitGroup for all bits not accounted for
		list.add(new BitGroup(~totalMask));

		return list;
	}

}