Skip to content

Commit 0617124

Browse files
committed
1.5.12
1 parent 68e44fd commit 0617124

File tree

6 files changed

+274
-366
lines changed

6 files changed

+274
-366
lines changed

docs/javadoc/com.marginallyClever.NodeGraphCore/com/marginallyClever/nodeGraphCore/TestNodeGraphCore.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<h1 title="Class TestNodeGraphCore" class="title">Class TestNodeGraphCore</h1>
7979
</div>
8080
<div class="inheritance" title="Inheritance Tree">java.lang.Object
81-
<div class="inheritance">com.marginallyclever.nodegraphcore.TestGraphCore</div>
81+
<div class="inheritance">com.marginallyclever.nodegraphcore.TestGraph</div>
8282
</div>
8383
<section class="description">
8484
<hr>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.marginallyclever</groupId>
66
<artifactId>nodegraphcore</artifactId>
7-
<version>1.5.11</version>
7+
<version>1.5.12</version>
88

99
<name>NodeGraphCore</name>
1010
<description>Flow based programming in Java.</description>

src/main/java/com/marginallyclever/nodegraphcore/Graph.java

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@ public class Graph extends Node {
3434
*/
3535
private final List<Connection> connections = new ArrayList<>();
3636

37-
/**
38-
* the {@link Input} ports of this graph. The ports are owned by nodes in this graph.
39-
*/
40-
private final List<Input<?>> inputs = new ArrayList<>();
41-
42-
/**
43-
* the {@link Output} ports of this graph. The ports are owned by nodes in this graph.
44-
*/
45-
private final List<Output<?>> outputs = new ArrayList<>();
46-
4737
/**
4838
* Constructor for subclasses to call. Creates an empty {@link Graph}.
4939
*/
@@ -541,56 +531,4 @@ public boolean isPortConnected(Port<?> port) {
541531
}
542532
return false;
543533
}
544-
545-
/**
546-
*
547-
* @param selectedNodes the set of {@link Node}s.
548-
* @return a list of all {@link Port} in the input and output list that are owned by the selected {@link Node}s.
549-
*/
550-
public List<Port<?>> getGraphPorts(List<Node> selectedNodes) {
551-
List<Port<?>> list = new ArrayList<>();
552-
for(Node n : selectedNodes) {
553-
for (Port<?> p : n.getPorts()) {
554-
if(p instanceof Output<?> out && !outputs.contains(out)) list.add(out);
555-
else if(p instanceof Input<?> in && !inputs.contains(in)) list.add(in);
556-
}
557-
}
558-
return list;
559-
}
560-
561-
/**
562-
* Remove some externally visible {@link Port}s from the graph.
563-
* @param graphPorts the list of {@link Port}s to remove.
564-
*/
565-
public void removePorts(List<Port<?>> graphPorts) {
566-
for(Port<?> p : graphPorts) {
567-
if(p instanceof Output<?> out) outputs.remove(out);
568-
else if(p instanceof Input<?> in) inputs.remove(in);
569-
}
570-
}
571-
572-
/**
573-
* Add some externally visible {@link Port}s to the graph.
574-
* @param graphPorts the list of {@link Port}s to add.
575-
*/
576-
public void addPorts(List<Port<?>> graphPorts) {
577-
for(Port<?> p : graphPorts) {
578-
if(p instanceof Output<?> out) outputs.add(out);
579-
else if(p instanceof Input<?> in) inputs.add(in);
580-
}
581-
}
582-
583-
/**
584-
* @return a copy of the list of externally visible {@link Input}s.
585-
*/
586-
public List<Input<?>> getInputs() {
587-
return new ArrayList<>(inputs);
588-
}
589-
590-
/**
591-
* @return a copy of the list of externally visible {@link Output}s.
592-
*/
593-
public List<Output<?>> getOutputs() {
594-
return new ArrayList<>(outputs);
595-
}
596534
}

src/main/java/com/marginallyclever/nodegraphcore/Node.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public void fromJSON(JSONObject jo) throws JSONException {
305305
RectangleDAO4JSON dao = new RectangleDAO4JSON();
306306
rectangle.setBounds(dao.fromJSON(jo.getJSONObject("rectangle")));
307307
}
308-
if(jo.has("ports")) {
308+
if(jo.has("variables")) {
309309
// all ports
310310
parseAllPortsFromJSON(jo.getJSONArray("variables"));
311311
}

0 commit comments

Comments
 (0)