"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java" between
plantuml-1.2019.11.tar.gz and plantuml-1.2019.12.tar.gz

About: PlantUML is a tool (written in Java) to draw UML diagrams, using a simple and human readable text description. Sources.

ComplementSeveralDays.java  (plantuml-1.2019.11):ComplementSeveralDays.java  (plantuml-1.2019.12)
skipping to change at line 48 skipping to change at line 48
import net.sourceforge.plantuml.command.regex.IRegex; import net.sourceforge.plantuml.command.regex.IRegex;
import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
public class ComplementSeveralDays implements ComplementPattern { public class ComplementSeveralDays implements ComplementPattern {
public IRegex toRegex(String suffix) { public IRegex toRegex(String suffix) {
return new RegexConcat( // return new RegexConcat( //
new RegexLeaf("COMPLEMENT" + suffix, "(\\d+)[%s]+ (days?|weeks?)")); // new RegexLeaf("COMPLEMENT" + suffix, "(\\d+)[%s]+ (days?|weeks?)")); //
// new RegexLeaf("LOAD" + suffix, "([%s]+at[%s]+(\\d+)%)?"));
} }
public Failable<Complement> getComplement(GanttDiagram system, RegexResul t arg, String suffix) { public Failable<Complement> getComplement(GanttDiagram system, RegexResul t arg, String suffix) {
final String number = arg.get("COMPLEMENT" + suffix, 0); final String number = arg.get("COMPLEMENT" + suffix, 0);
final boolean inWeeks = arg.get("COMPLEMENT" + suffix, 1).startsW ith("w"); final boolean inWeeks = arg.get("COMPLEMENT" + suffix, 1).startsW ith("w");
final int factor = inWeeks ? system.daysInWeek() : 1; final int factor = inWeeks ? system.daysInWeek() : 1;
// final String load = arg.get("LOAD" + suffix, 1);
final int days = Integer.parseInt(number) * factor; final int days = Integer.parseInt(number) * factor;
// if (load == null) {
return Failable.<Complement> ok(LoadInDays.inDay(days)); return Failable.<Complement> ok(LoadInDays.inDay(days));
// }
// return Failable.<Complement> ok(LoadInDays.inDayWithLoad(days,
Integer.parseInt(load)));
} }
} }
 End of changes. 4 change blocks. 
6 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)