private int primitiveAmount ( Object ... values ) { int result = 0 ; for ( int i = 0 ; i < values . length ; i ++ ) { if ( MappingUtils . isPrimitive ( values [ i ] ) == true ) { result ++ ; } } return result ; }
Iterates over values and returns amount of primitive values in it . Used to check if values supplied via constructors aren t mixed as only primitive or complex types are allows