Class ReservationRegistrationProposeDistributor<G>

java.lang.Object
ch.tocco.nice2.optional.reservation.impl.ReservationRegistrationProposeDistributor<G>

public class ReservationRegistrationProposeDistributor<G> extends Object
Distribute objects from groups to targets.
  • Constructor Details

    • ReservationRegistrationProposeDistributor

      public ReservationRegistrationProposeDistributor(int numTargets, int sizeTarget)
  • Method Details

    • setGroups

      public void setGroups(Iterable<Iterable<G>> iterable)
    • getTargets

    • hasFailed

      public boolean hasFailed()
    • assignSeparate

      public void assignSeparate()
      Only members of the same group are put in a target
    • assignSpread

      public void assignSpread()
      Same number of members of each group are put in one target (as good as possible)