Skip to content
Snippets Groups Projects

Mutation

Merged Leon Frenot requested to merge mutation into master
19 files
+ 462
11
Compare changes
  • Side-by-side
  • Inline
Files
19
@@ -72,4 +72,18 @@ public class AddAttributeMutation extends AttributeMutation implements AddMutati
block.addAttribute(aa);
}
public static AddAttributeMutation createFromString(String toParse) {
AddAttributeMutation mutation = null;
String[] tokens = toParse.split(" ");
String _attributeType = tokens[2];
String _attributeName = tokens[3];
String _blockName = tokens[tokens.length-1];
if (tokens[4].equals("=")) {
String _initialValue = tokens[5];
mutation = new AddAttributeMutation(_blockName, _attributeName, _attributeType, _initialValue);
} else {
mutation = new AddAttributeMutation(_blockName, _attributeName, _attributeType);
}
return mutation;
}
}
\ No newline at end of file
Loading