protected int sign ( Control ctrl ) { ControlType type = ctrl . getControlType ( ) ; if ( type != null && type . name ( ) . startsWith ( "I" ) ) return - 1 ; return 1 ; }
Identifies negative and positive controls . Assumes positive by default .