question: static boolean validateType ( ActionSchema as , Set values ) { if ( ( values == null ) || values . isEmpty ( ) ) { return ( true ) ; } AttributeSchema . Type type = as . getType ( ) ; boolean checkType = false ; if ( type . equals ( AttributeSchema . Type . SINGLE ) || type . equals ( AttributeSchema . Type . SINGLE_CHOICE ) ) { checkType = true ; if ( values . size ( ) > 1 ) { return ( false ) ; } } if ( type . equals ( AttributeSchema . Type . SINGLE_CHOICE ) || type . equals ( AttributeSchema . Type . MULTIPLE_CHOICE ) ) { checkType = true ; Set validValues = as . getActionValues ( ) ; Iterator givenValues = values . iterator ( ) ; while ( givenValues . hasNext ( ) ) { if ( ! validValues . contains ( givenValues . next ( ) ) ) { return ( false ) ; } } } if ( ! checkType && ! type . equals ( AttributeSchema . Type . LIST ) ) { return ( false ) ; } return ( true ) ; }
target:  Checks the validity of action values against the action 's type as defined in the action schema.