private static List < Object > removeOperatorsFromQueryParamList ( QueryParam . Type type , List < String > queryParamList ) { List < Object > newQueryParamList = new ArrayList <> ( ) ; for ( String queryItem : queryParamList ) { Matcher matcher = getPattern ( type ) . matcher ( queryItem ) ; String queryValueString = queryItem ; if ( matcher . find ( ) ) { queryValueString = matcher . group ( 2 ) ; } switch ( type ) { case STRING : case TEXT : case TEXT_ARRAY : newQueryParamList . add ( queryValueString ) ; break ; case LONG : case LONG_ARRAY : case INTEGER : case INTEGER_ARRAY : newQueryParamList . add ( Long . parseLong ( queryValueString ) ) ; break ; case DOUBLE : case DECIMAL : case DECIMAL_ARRAY : newQueryParamList . add ( Double . parseDouble ( queryValueString ) ) ; break ; case BOOLEAN : case BOOLEAN_ARRAY : newQueryParamList . add ( Boolean . parseBoolean ( queryValueString ) ) ; break ; default : break ; } } return newQueryParamList ; }
Removes any operators present in the queryParamList and gets a list of the values parsed to the corresponding data type .