private static void distributeShareMax ( Collection < ? extends Schedulable > schedulableVector ) { for ( Schedulable schedulable : schedulableVector ) { double minShare = Math . max ( schedulable . getMinimum ( ) , schedulable . getRequested ( ) ) ; schedulable . share += Math . min ( schedulable . getMaximum ( ) , minShare ) ; } }
Increment each of the schedulables share by the lesser of its min demand or its maximum .