mirror of
				https://github.com/DanilaFe/abacus
				synced 2025-11-03 18:33:41 -08:00 
			
		
		
		
	Add link nodes to collections and check for their presence.
This prevents infinite loops, as Link nodes do not follow regular addInto behavior.
This commit is contained in:
		
							parent
							
								
									c9fad36d16
								
							
						
					
					
						commit
						0263086e10
					
				@ -11,7 +11,10 @@ public class LinkNode<T> extends PatternNode<T> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void addInto(Collection<PatternNode<T>> into) {
 | 
					    public void addInto(Collection<PatternNode<T>> into) {
 | 
				
			||||||
        addOutputsInto(into);
 | 
					        if(!into.contains(this)) {
 | 
				
			||||||
 | 
					            into.add(this);
 | 
				
			||||||
 | 
					            addOutputsInto(into);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user