aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/config/Attribute.java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-13 07:24:03 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-13 07:24:03 -0500
commit5e55d196be092f4a4dcb212cf09d7a1bdab70e00 (patch)
treeeb765a1b961fefdaa7ddc3cfae9cb83a09e0c031 /app/src/main/java/com/wireguard/config/Attribute.java
parentProfile: Add function to copy config from another profile (diff)
downloadwireguard-android-5e55d196be092f4a4dcb212cf09d7a1bdab70e00.tar.xz
wireguard-android-5e55d196be092f4a4dcb212cf09d7a1bdab70e00.zip
Major renaming and refactoring in activity and service
Apparently "configuration" is the proper term, not "profile". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/config/Attribute.java')
-rw-r--r--app/src/main/java/com/wireguard/config/Attribute.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/com/wireguard/config/Attribute.java b/app/src/main/java/com/wireguard/config/Attribute.java
index 7629456a..e00ebb4c 100644
--- a/app/src/main/java/com/wireguard/config/Attribute.java
+++ b/app/src/main/java/com/wireguard/config/Attribute.java
@@ -24,23 +24,23 @@ enum Attribute {
static {
map = new HashMap<>(Attribute.values().length);
- for (Attribute key : Attribute.values())
+ for (final Attribute key : Attribute.values())
map.put(key.getToken(), key);
}
- public static Attribute match(String line) {
+ public static Attribute match(final String line) {
return map.get(line.split("\\s|=")[0]);
}
private final String token;
private final Pattern pattern;
- Attribute(String token) {
- this.pattern = Pattern.compile(token + "\\s*=\\s*(\\S.*)");
+ Attribute(final String token) {
+ pattern = Pattern.compile(token + "\\s*=\\s*(\\S.*)");
this.token = token;
}
- public String composeWith(String value) {
+ public String composeWith(final String value) {
return token + " = " + value + "\n";
}
@@ -48,7 +48,7 @@ enum Attribute {
return token;
}
- public String parseFrom(String line) {
+ public String parseFrom(final String line) {
final Matcher matcher = pattern.matcher(line);
if (matcher.matches())
return matcher.group(1);