* Creates a new bit set. All bits are initially <code>false</code>.\r
*/\r
public RLEBitSet() {\r
- bitsets = new TreeSet<RLE>();\r
+ bitsets = new TreeSet<>();\r
}\r
\r
/**\r
* @param s the initialization String\r
*/\r
public RLEBitSet(String s) {\r
- bitsets = new TreeSet<RLE>();\r
+ bitsets = new TreeSet<>();\r
set(s);\r
}\r
\r
* @throws NumberFormatException - if a number is incorrectly formatted\r
* @throws IndexOutOfBoundsException - if an index is negative\r
*/\r
- public void set(String s) throws NumberFormatException {\r
+ public void set(String s) {\r
s = s.trim();\r
if (!s.isEmpty()) {\r
for (String s2 : s.split("[, \n]+")) {\r
public void clear(long from, long to) {\r
checkRange(from, to);\r
RLE newbits = new RLE(from, to - from);\r
- List<RLE> newranges = new ArrayList<RLE>();\r
+ List<RLE> newranges = new ArrayList<>();\r
synchronized (bitsets) {\r
for (RLE bs : bitsets) {\r
if (bs.intersects(newbits)) {\r