private Node<D> nodeAt( double x, double y, double width, double height ){ for( Node<D> existingNode : nodes ){ if( existingNode.x == x && existingNode.y == y && existingNode.width == width && existingNode.height == height){ return existingNode; } } Node<D> node = new Node<D>(); node.x = x; node.y = y; node.width = width; node.height = height; nodes.add( node ); return node; }
private Node<D> nodeAt( double x, double y, double width, double height ){ for( Node<D> existingNode : nodes ){ if( existingNode.x == x && existingNode.y == y && existingNode.width == width && existingNode.height == height){ return existingNode; } } Node<D> node = new Node<D>(); node.x = x; node.y = y; node.width = width; node.height = height; nodes.add( node ); return node; }
double dmy = (may - mby) * w; Node<D> node = new Node<D>();
double dmy = (may - mby) * w; Node<D> node = new Node<D>();