private List < SessionNode > getChangedNodesAtOrBelowChildrenFirst ( Path nodePath ) { List < SessionNode > changedNodesChildrenFirst = new ArrayList < SessionNode > ( ) ; for ( NodeKey key : changedNodes . keySet ( ) ) { SessionNode changedNode = changedNodes . get ( key ) ; boolean isAtOrBelow = false ; try { isAtOrBelow = changedNode . isAtOrBelow ( this , nodePath ) ; } catch ( NodeNotFoundException e ) { isAtOrBelow = false ; } if ( ! isAtOrBelow ) { continue ; } int insertIndex = changedNodesChildrenFirst . size ( ) ; Path changedNodePath = changedNode . getPath ( this ) ; for ( int i = 0 ; i < changedNodesChildrenFirst . size ( ) ; i ++ ) { if ( changedNodesChildrenFirst . get ( i ) . getPath ( this ) . isAncestorOf ( changedNodePath ) ) { insertIndex = i ; break ; } } changedNodesChildrenFirst . add ( insertIndex , changedNode ) ; } return changedNodesChildrenFirst ; }
Returns the list of changed nodes at or below the given path starting with the children .