private static int [ ] getFactors ( int _value , int _max ) { final int factors [ ] = new int [ MAX_GROUP_SIZE ] ; int factorIdx = 0 ; for ( int possibleFactor = 1 ; possibleFactor <= _max ; possibleFactor ++ ) { if ( ( _value % possibleFactor ) == 0 ) { factors [ factorIdx ++ ] = possibleFactor ; } } return ( Arrays . copyOf ( factors , factorIdx ) ) ; }
Determine the set of factors for a given value .