Interface EndpointWeightTransition

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EndpointWeightTransition
Computes the weight of the given Endpoint using the given currentStep and totalSteps.
  • Method Details

    • linear

      static EndpointWeightTransition linear()
      Returns the EndpointWeightTransition which returns the gradually increased weight as the current step increases.
    • aggression

      static EndpointWeightTransition aggression(double aggression, double minWeightPercent)
      Returns an EndpointWeightTransition which returns a non-linearly increasing weight based on an aggression factor. Higher aggression factors will assign higher weights for lower steps. You may also specify a minWeightPercent to specify a lower bound for the computed weights. Refer to the following link for more information.
    • compute

      int compute(Endpoint endpoint, int currentStep, int totalSteps)
      Returns the computed weight of the given Endpoint using the given currentStep and totalSteps.