android-studio/bin/format.sh -m '*.java' -r brouter-routing-app
To rebase active branches on top of the new master just rebase your
branch onto the commit prior to the reformatting and format every commit
of your branch using (<commit> should be replaced by this commit)
git rebase \
--strategy-option=theirs \
--onto <commit> \
--exec 'format.sh -m "*.java" -r brouter-routing-app' \
--exec 'git commit --all --no-edit --amend' \
<commit>~
To ignore this mass edit during git blame see `.git-blame-ignore-revs`
45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
package btools.routingapp;
|
|
|
|
import java.util.StringTokenizer;
|
|
import java.util.TreeSet;
|
|
|
|
|
|
/**
|
|
* Decsription of a service config
|
|
*/
|
|
public class ServiceModeConfig {
|
|
public String mode;
|
|
public String profile;
|
|
public TreeSet<String> nogoVetos;
|
|
|
|
public ServiceModeConfig(String line) {
|
|
StringTokenizer tk = new StringTokenizer(line);
|
|
mode = tk.nextToken();
|
|
profile = tk.nextToken();
|
|
nogoVetos = new TreeSet<String>();
|
|
while (tk.hasMoreTokens()) {
|
|
nogoVetos.add(tk.nextToken());
|
|
}
|
|
}
|
|
|
|
public ServiceModeConfig(String mode, String profile) {
|
|
this.mode = mode;
|
|
this.profile = profile;
|
|
nogoVetos = new TreeSet<String>();
|
|
}
|
|
|
|
public String toLine() {
|
|
StringBuilder sb = new StringBuilder(100);
|
|
sb.append(mode).append(' ').append(profile);
|
|
for (String veto : nogoVetos) sb.append(' ').append(veto);
|
|
return sb.toString();
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder(100);
|
|
sb.append(mode).append("->").append(profile);
|
|
sb.append(" [" + nogoVetos.size() + "]");
|
|
return sb.toString();
|
|
}
|
|
}
|