Skip to content

Instantly share code, notes, and snippets.

@azenla
Last active December 17, 2015 13:19
Show Gist options
  • Save azenla/5616416 to your computer and use it in GitHub Desktop.
Save azenla/5616416 to your computer and use it in GitHub Desktop.
GCPHelper Class
package com.directmyfile.gcp.client.core;
import java.util.HashMap;
public class GCPLine {
private HashMap<String, String> properties;
private String command;
public GCPLine(String line) {
this.properties = new HashMap<String, String>();
this.command = line.substring(0, line.indexOf(':'));
String[] propList = line.substring(line.indexOf(':') + 1).split(":");
for (String prop : propList) {
String[] keyValue = prop.split("=");
properties.put(keyValue[0], keyValue[1]);
}
}
public String getProperty(String key) {
return properties.get(key);
}
public String getCommand() {
return command;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment