@Test void getAllSetBits() { Bitlist bitlist = create(0, 1, 3, 8, 9); assertThat(bitlist.getAllSetBits()).containsExactly(0, 1, 3, 8, 9); }
public List<Integer> getAllSetBits() { final List<Integer> setBits = new ArrayList<>(); for (int i = data.nextSetBit(0); i >= 0; i = data.nextSetBit(i + 1)) { setBits.add(i); } return setBits; }
Bitlist { public List<Integer> getAllSetBits() { final List<Integer> setBits = new ArrayList<>(); for (int i = data.nextSetBit(0); i >= 0; i = data.nextSetBit(i + 1)) { setBits.add(i); } return setBits; } }
Bitlist { public List<Integer> getAllSetBits() { final List<Integer> setBits = new ArrayList<>(); for (int i = data.nextSetBit(0); i >= 0; i = data.nextSetBit(i + 1)) { setBits.add(i); } return setBits; } Bitlist(int arraySize, long maxSize);  Bitlist(Bitlist bitlist); private  Bitlist(int size, BitSet data, long maxSize); }
Bitlist { public List<Integer> getAllSetBits() { final List<Integer> setBits = new ArrayList<>(); for (int i = data.nextSetBit(0); i >= 0; i = data.nextSetBit(i + 1)) { setBits.add(i); } return setBits; } Bitlist(int arraySize, long maxSize);  Bitlist(Bitlist bitlist); private  Bitlist(int size, BitSet data, long maxSize); void setBit(int i); void setBits(int... indexes); boolean getBit(int i); int getBitCount(); boolean intersects(Bitlist other); boolean isSuperSetOf(final Bitlist other); List<Integer> getAllSetBits(); IntStream streamAllSetBits(); void setAllBits(Bitlist other); long getMaxSize(); int getCurrentSize(); @SuppressWarnings("NarrowingCompoundAssignment") Bytes serialize(); static int sszSerializationLength(final int size); static Bitlist fromBytes(Bytes bytes, long maxSize); Bitlist copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
Bitlist { public List<Integer> getAllSetBits() { final List<Integer> setBits = new ArrayList<>(); for (int i = data.nextSetBit(0); i >= 0; i = data.nextSetBit(i + 1)) { setBits.add(i); } return setBits; } Bitlist(int arraySize, long maxSize);  Bitlist(Bitlist bitlist); private  Bitlist(int size, BitSet data, long maxSize); void setBit(int i); void setBits(int... indexes); boolean getBit(int i); int getBitCount(); boolean intersects(Bitlist other); boolean isSuperSetOf(final Bitlist other); List<Integer> getAllSetBits(); IntStream streamAllSetBits(); void setAllBits(Bitlist other); long getMaxSize(); int getCurrentSize(); @SuppressWarnings("NarrowingCompoundAssignment") Bytes serialize(); static int sszSerializationLength(final int size); static Bitlist fromBytes(Bytes bytes, long maxSize); Bitlist copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }