private static boolean touches_ ( String scl , int dim_a , int dim_b ) { // Points cant touch if ( dim_a == 0 && dim_b == 0 ) return false ; if ( ! ( dim_a == 2 && dim_b == 2 ) ) { // Valid for area-Line, Line-Line, area-Point, and Line-Point if ( scl . charAt ( 0 ) == ' ' && scl . charAt ( 1 ) == ' ' && scl . charAt ( 2 ) == ' ' && scl . charAt ( 3 ) == ' ' && scl . charAt ( 4 ) == ' ' && scl . charAt ( 5 ) == ' ' && scl . charAt ( 6 ) == ' ' && scl . charAt ( 7 ) == ' ' && scl . charAt ( 8 ) == ' ' ) return true ; if ( dim_a == 1 && dim_b == 1 ) { // Valid for Line-Line if ( scl . charAt ( 0 ) == ' ' && scl . charAt ( 1 ) == ' ' && scl . charAt ( 2 ) == ' ' && scl . charAt ( 3 ) == ' ' && scl . charAt ( 4 ) == ' ' && scl . charAt ( 5 ) == ' ' && scl . charAt ( 6 ) == ' ' && scl . charAt ( 7 ) == ' ' && scl . charAt ( 8 ) == ' ' ) return true ; } } // Valid for area-area, area-Line, Line-Line if ( dim_b != 0 ) { if ( scl . charAt ( 0 ) == ' ' && scl . charAt ( 1 ) == ' ' && scl . charAt ( 2 ) == ' ' && scl . charAt ( 3 ) == ' ' && scl . charAt ( 4 ) == ' ' && scl . charAt ( 5 ) == ' ' && scl . charAt ( 6 ) == ' ' && scl . charAt ( 7 ) == ' ' && scl . charAt ( 8 ) == ' ' ) return true ; } return false ; }
Checks whether the scl string is the touches relation .