mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
<> operator
This commit is contained in:
parent
70a9682c80
commit
789ff2309b
@ -50,7 +50,7 @@ import net.sourceforge.plantuml.core.UmlSource;
|
||||
|
||||
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||
|
||||
private final Map<String, String> config = new LinkedHashMap<String, String>();
|
||||
private final Map<String, String> config = new LinkedHashMap<>();
|
||||
private final List<Marker> markers = new ArrayList<>();
|
||||
private int width;
|
||||
private int height;
|
||||
|
@ -50,7 +50,7 @@ abstract class MonoSwimable extends WithNote implements Swimable {
|
||||
}
|
||||
|
||||
final public Set<Swimlane> getSwimlanes() {
|
||||
return swimlane == null ? Collections.<Swimlane>emptySet() : Collections.<Swimlane>singleton(swimlane);
|
||||
return swimlane == null ? Collections.emptySet() : Collections.<Swimlane>singleton(swimlane);
|
||||
}
|
||||
|
||||
final public Swimlane getSwimlaneIn() {
|
||||
|
@ -42,7 +42,6 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
public class TextBlockInterceptorUDrawable extends AbstractTextBlock implements TextBlock {
|
||||
|
||||
@ -53,7 +52,7 @@ public class TextBlockInterceptorUDrawable extends AbstractTextBlock implements
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
new UGraphicInterceptorUDrawable2(ug, new HashMap<String, UTranslate>()).draw(textBlock);
|
||||
new UGraphicInterceptorUDrawable2(ug, new HashMap<>()).draw(textBlock);
|
||||
ug.flushUg();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.activitydiagram3.gtile.GConnection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.gtile.Gtile;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
|
||||
|
@ -62,7 +62,7 @@ import net.sourceforge.plantuml.ugraphic.comp.CompressionMode;
|
||||
|
||||
public class Worm implements Iterable<Point2D.Double> {
|
||||
|
||||
private final List<Point2D.Double> points = new ArrayList<Point2D.Double>();
|
||||
private final List<Point2D.Double> points = new ArrayList<>();
|
||||
private final Style style;
|
||||
|
||||
public Worm(Style style) {
|
||||
@ -230,7 +230,7 @@ public class Worm implements Iterable<Point2D.Double> {
|
||||
public String toString() {
|
||||
final StringBuilder result = new StringBuilder();
|
||||
for (int i = 0; i < points.size() - 1; i++)
|
||||
result.append(getDirectionAtPoint(i) + " ");
|
||||
result.append(getDirectionAtPoint(i)).append(" ");
|
||||
|
||||
return result + points.toString();
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ import java.util.Map;
|
||||
|
||||
public class BArray implements Iterable<BNode> {
|
||||
|
||||
private final Map<String, BNode> data = new HashMap<String, BNode>();
|
||||
private final Map<String, BNode> data = new HashMap<>();
|
||||
private int maxX;
|
||||
private int maxY;
|
||||
|
||||
|
@ -311,7 +311,7 @@ public class Grid {
|
||||
// }
|
||||
|
||||
public void addConnections() {
|
||||
for (Map.Entry<Coord, Cell> ent : new HashMap<Coord, Cell>(cells).entrySet()) {
|
||||
for (Map.Entry<Coord, Cell> ent : new HashMap<>(cells).entrySet()) {
|
||||
final List<Placeable> dests2 = ent.getValue().getDestinations2();
|
||||
final Coord src = ent.getKey();
|
||||
for (int i = 0; i < dests2.size(); i++) {
|
||||
|
@ -97,7 +97,7 @@ final public class UmlSource {
|
||||
}
|
||||
|
||||
public UmlSource(List<StringLocated> data, boolean checkEndingBackslash) {
|
||||
this(data, checkEndingBackslash, new ArrayList<StringLocated>());
|
||||
this(data, checkEndingBackslash, new ArrayList<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,14 +109,14 @@ final public class UmlSource {
|
||||
* following one.
|
||||
*/
|
||||
public UmlSource(List<StringLocated> data, boolean checkEndingBackslash, List<StringLocated> rawSource) {
|
||||
this(new ArrayList<StringLocated>(), rawSource);
|
||||
this(new ArrayList<>(), rawSource);
|
||||
|
||||
if (checkEndingBackslash) {
|
||||
final StringBuilder pending = new StringBuilder();
|
||||
for (StringLocated cs : data) {
|
||||
final String s = cs.getString();
|
||||
if (StringUtils.endsWithBackslash(s)) {
|
||||
pending.append(s.substring(0, s.length() - 1));
|
||||
pending.append(s, 0, s.length() - 1);
|
||||
} else {
|
||||
pending.append(s);
|
||||
this.source.add(new StringLocated(pending.toString(), cs.getLocation()));
|
||||
|
@ -109,9 +109,9 @@ public class SheetBlock1 extends AbstractTextBlock implements TextBlock, Atom, S
|
||||
for (Stripe stripe : sheet) {
|
||||
stripes.addAll(new Fission(stripe, maxWidth).getSplitted(stringBounder));
|
||||
}
|
||||
positions = new LinkedHashMap<Atom, Position>();
|
||||
widths = new LinkedHashMap<Stripe, Double>();
|
||||
heights = new LinkedHashMap<Stripe, Double>();
|
||||
positions = new LinkedHashMap<>();
|
||||
widths = new LinkedHashMap<>();
|
||||
heights = new LinkedHashMap<>();
|
||||
minMax = MinMax.getEmpty(true);
|
||||
double y = 0;
|
||||
for (Stripe stripe : stripes) {
|
||||
|
@ -48,7 +48,7 @@ public class Stereostyles {
|
||||
|
||||
public static final Stereostyles NONE = new Stereostyles();
|
||||
|
||||
private final Set<String> names = new LinkedHashSet<String>();
|
||||
private final Set<String> names = new LinkedHashSet<>();
|
||||
|
||||
private Stereostyles() {
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class TextBlockMap extends AbstractTextBlock implements WithPorts {
|
||||
private final FontParam fontParam;
|
||||
private final ISkinParam skinParam;
|
||||
private final FontConfiguration fontConfiguration;
|
||||
private final Map<TextBlock, TextBlock> blocksMap = new LinkedHashMap<TextBlock, TextBlock>();
|
||||
private final Map<TextBlock, TextBlock> blocksMap = new LinkedHashMap<>();
|
||||
private final List<String> keys = new ArrayList<>();
|
||||
private double totalWidth;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user