public static boolean matches ( Map < String , Object > nodeProperties , String [ ] keyColumnNames , Object [ ] keyColumnValues ) { for ( int i = 0 ; i < keyColumnNames . length ; i ++ ) { String property = keyColumnNames [ i ] ; Object expectedValue = keyColumnValues [ i ] ; boolean containsProperty = nodeProperties . containsKey ( property ) ; if ( containsProperty ) { Object actualValue = nodeProperties . get ( property ) ; if ( ! sameValue ( expectedValue , actualValue ) ) { return false ; } } else if ( expectedValue != null ) { return false ; } } return true ; }
Check if the node matches the column values