Last active
December 17, 2015 13:19
-
-
Save azenla/5616416 to your computer and use it in GitHub Desktop.
GCPHelper Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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