Commit b40ad7f2 authored by Daniel Le Berre's avatar Daniel Le Berre

String[] -> Collection<String>

parent 0df1ee25
Pipeline #5668 passed with stages
in 118 minutes and 17 seconds
......@@ -31,6 +31,8 @@ package org.sat4j.reader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import org.sat4j.specs.ContradictionException;
......@@ -97,8 +99,10 @@ public class InstanceReader extends Reader {
return this.aag;
}
protected String[] getReservedPrefixes() {
return new String[] { "EZCNF" };
protected Collection<String> getReservedPrefixes() {
Collection<String> prefixes = new ArrayList<>();
prefixes.add("EZCNF");
return prefixes;
}
@Override
......
......@@ -29,6 +29,8 @@
*******************************************************************************/
package org.sat4j.pb.reader;
import java.util.Collection;
import org.sat4j.pb.IPBSolver;
import org.sat4j.pb.PBSolverHandle;
import org.sat4j.pb.PseudoOptDecorator;
......@@ -73,12 +75,9 @@ public class PBInstanceReader extends InstanceReader {
}
@Override
protected String[] getReservedPrefixes() {
String[] parent = super.getReservedPrefixes();
int n = parent.length;
String[] prefixes = new String[n + 1];
System.arraycopy(parent, 0, prefixes, 0, n);
prefixes[n] = "PB";
protected Collection<String> getReservedPrefixes() {
Collection<String> prefixes = super.getReservedPrefixes();
prefixes.add("PB");
return prefixes;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment