Class ParameterBuilder.IntegerBuilder

java.lang.Object
org.moeaframework.analysis.parameter.ParameterBuilder.IntegerBuilder
Enclosing class:
ParameterBuilder

public static class ParameterBuilder.IntegerBuilder extends Object
A typed parameter builder for integer values.
  • Method Details

    • constant

      public Constant<Integer> constant(int value)
      Builds a constant parameter with the given value.
      Parameters:
      value - the constant value
      Returns:
      the parameter
    • withValues

      public Enumeration<Integer> withValues(int... values)
      Builds an enumeration with the given values.
      Parameters:
      values - the enumerated values
      Returns:
      the parameter
    • rangeExclusive

      public Enumeration<Integer> rangeExclusive(int startInclusive, int endExclusive)
      Builds an enumeration of all values between the start and end bounds.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endExclusive - the upper bound (exclusive)
      Returns:
      the parameter
    • rangeExclusive

      public Enumeration<Integer> rangeExclusive(int startInclusive, int endExclusive, int stepSize)
      Builds an enumeration of values between the start and end bounds, incrementing by the given step size.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endExclusive - the upper bound (exclusive)
      stepSize - the step size
      Returns:
      the parameter
    • range

      public Enumeration<Integer> range(int startInclusive, int endInclusive)
      Builds an enumeration of all values between the start and end bounds.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endInclusive - the upper bound (inclusive)
      Returns:
      the parameter
    • range

      public Enumeration<Integer> range(int startInclusive, int endInclusive, int stepSize)
      Builds an enumeration of values between the start and end bounds, incrementing by the given step size.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endInclusive - the upper bound (inclusive)
      stepSize - the step size
      Returns:
      the parameter
    • random

      public Enumeration<Integer> random(int startInclusive, int endInclusive, int count)
      Builds an enumeration of values sampled uniformly at random between the start and end bounds. Unlike sampledBetween(int, int), this produces a fixed enumeration of values.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endInclusive - the upper bound (inclusive)
      count - the number of values to enumerate
      Returns:
      the parameter
    • sampledBetween

      public SampledInteger sampledBetween(int startInclusive, int endInclusive)
      Builds a parameter that samples values uniformly at random between the start and end bounds.
      Parameters:
      startInclusive - the lower bound (inclusive)
      endInclusive - the upper bound (inclusive)
      Returns:
      the parameter