Dear Sirs,
I'm starting to write a strategy, which, after adding a little class parsing string to hash, compiles without errors, but the strategy says "class not found".
I am new to Java and Jforex, so any link to manual will be greately appreciated.
Here is the class I added:
private class ServerInfo {
private HashMap indexValues;
private HashMap indexColors;
public String fill(String desc) { // Создаёт класс из описателя
String rv;
rv = "";
Pattern pattern = Pattern.compile("\\s*([\\d\\w]+)\\s*=\\s*([^;]+);");
Matcher matcher = pattern.matcher(desc);
while (matcher.find()) {
String par = matcher.group(1);
if(par == "CMD") {
rv = matcher.group(2);
}
else {
indexValues.put(par,new String(matcher.group(2)));
}
}
return rv;
}
public ServerInfo(String desc) { // Заполняет значения из описателя
Pattern pattern = Pattern.compile("\\s*([\\d\\w]+)\\s*=\\s*([^;]+);");
Matcher matcher = pattern.matcher(desc);
while (matcher.find()) {
indexColors.put(matcher.group(1),new String(matcher.group(2)));
}
}
public String get(String index) {
return (String) indexValues.get(index);
}
}