Node n = new Node(blabla); foreach( Node t in nodes ) { if( isThis(t)) { n = t; } }