public FlowNode goDownstream ( ) { if ( isValid ) { Direction direction = Direction . forFlow ( flow ) ; if ( direction != null ) { FlowNode nextNode = new FlowNode ( gridIter , cols , rows , col + direction . col , row + direction . row ) ; if ( nextNode . isValid ) { return nextNode ; } } } return null ; }
Get the next downstream node .