Interpolator1DFactory { public static Interpolator1D getInterpolator(final String interpolatorName) { final Interpolator1D interpolator = s_staticInstances.get(interpolatorName); if (interpolator != null) { return interpolator; } throw new IllegalArgumentException("Interpolator not handled: " + interpolatorName); } private  Interpolator1DFactory(); static Interpolator1D getInterpolator(final String interpolatorName); static String getInterpolatorName(final Interpolator1D interpolator); static final String LINEAR; static final String EXPONENTIAL; static final String LOG_LINEAR; static final String NATURAL_CUBIC_SPLINE; static final String BARYCENTRIC_RATIONAL_FUNCTION; static final String POLYNOMIAL; static final String RATIONAL_FUNCTION; static final String STEP; static final String STEP_UPPER; static final String DOUBLE_QUADRATIC; @Deprecated
  static final String MONOTONIC_CUBIC; static final String PCHIP; static final String MOD_PCHIP; static final String TIME_SQUARE; static final String FLAT_EXTRAPOLATOR; static final String LINEAR_EXTRAPOLATOR; static final String LOG_LINEAR_EXTRAPOLATOR; static final String QUADRATIC_LEFT_EXTRAPOLATOR; static final String EXPONENTIAL_EXTRAPOLATOR; static final String ISDA_INTERPOLATOR; static final String ISDA_EXTRAPOLATOR; static final LinearInterpolator1D LINEAR_INSTANCE; static final ExponentialInterpolator1D EXPONENTIAL_INSTANCE; static final LogLinearInterpolator1D LOG_LINEAR_INSTANCE; static final NaturalCubicSplineInterpolator1D NATURAL_CUBIC_SPLINE_INSTANCE; static final StepInterpolator1D STEP_INSTANCE; static final StepUpperInterpolator1D STEP_UPPER_INSTANCE; static final DoubleQuadraticInterpolator1D DOUBLE_QUADRATIC_INSTANCE; @Deprecated
  static final PCHIPInterpolator1D MONOTONIC_CUBIC_INSTANCE; static final PCHIPInterpolator1D PCHIP_INSTANCE; static final PCHIPYieldCurveInterpolator1D MOD_PCHIP_INSTANCE; static final TimeSquareInterpolator1D TIME_SQUARE_INSTANCE; static final FlatExtrapolator1D FLAT_EXTRAPOLATOR_INSTANCE; static final ExponentialExtrapolator1D EXPONENTIAL_EXTRAPOLATOR_INSTANCE; static final String CLAMPED_CUBIC; static final ClampedCubicSplineInterpolator1D CLAMPED_CUBIC_INSTANCE; static final String CLAMPED_CUBIC_MONOTONE; static final MonotonicityPreservingCubicSplineInterpolator1D CLAMPED_CUBIC_MONOTONE_INSTANCE; static final String CLAMPED_CUBIC_NONNEGATIVE; static final NonnegativityPreservingCubicSplineInterpolator1D CLAMPED_CUBIC_NONNEGATIVE_INSTANCE; static final String CLAMPED_QUINTIC_MONOTONE; static final MonotonicityPreservingQuinticSplineInterpolator1D CLAMPED_QUINTIC_MONOTONE_INSTANCE; static final String CLAMPED_QUINTIC_NONNEGATIVE; static final NonnegativityPreservingQuinticSplineInterpolator1D CLAMPED_QUINTIC_NONNEGATIVE_INSTANCE; static final String NATURAL_CUBIC_MONOTONE; static final MonotonicityPreservingCubicSplineInterpolator1D NATURAL_CUBIC_MONOTONE_INSTANCE; static final String NATURAL_CUBIC_NONNEGATIVE; static final NonnegativityPreservingCubicSplineInterpolator1D NATURAL_CUBIC_NONNEGATIVE_INSTANCE; static final String NATURAL_QUINTIC_MONOTONE; static final MonotonicityPreservingQuinticSplineInterpolator1D NATURAL_QUINTIC_MONOTONE_INSTANCE; static final String NATURAL_QUINTIC_NONNEGATIVE; static final NonnegativityPreservingQuinticSplineInterpolator1D NATURAL_QUINTIC_NONNEGATIVE_INSTANCE; static final String NOTAKNOT_CUBIC; static final NotAKnotCubicSplineInterpolator1D NOTAKNOT_CUBIC_INSTANCE; static final String NOTAKNOT_CUBIC_MONOTONE; static final MonotonicityPreservingCubicSplineInterpolator1D NOTAKNOT_CUBIC_MONOTONE_INSTANCE; static final String NOTAKNOT_CUBIC_NONNEGATIVE; static final NonnegativityPreservingCubicSplineInterpolator1D NOTAKNOT_CUBIC_NONNEGATIVE_INSTANCE; static final String NOTAKNOT_QUINTIC_MONOTONE; static final MonotonicityPreservingQuinticSplineInterpolator1D NOTAKNOT_QUINTIC_MONOTONE_INSTANCE; static final String NOTAKNOT_QUINTIC_NONNEGATIVE; static final NonnegativityPreservingQuinticSplineInterpolator1D NOTAKNOT_QUINTIC_NONNEGATIVE_INSTANCE; static final String CONSTRAINED_CUBIC; static final ConstrainedCubicSplineInterpolator1D CONSTRAINED_CUBIC_INSTANCE; static final String CONSTRAINED_CUBIC_MONOTONE; static final MonotonicityPreservingCubicSplineInterpolator1D CONSTRAINED_CUBIC_MONOTONE_INSTANCE; static final String CONSTRAINED_CUBIC_NONNEGATIVE; static final NonnegativityPreservingCubicSplineInterpolator1D CONSTRAINED_CUBIC_NONNEGATIVE_INSTANCE; static final String AKIMA_CUBIC; static final SemiLocalCubicSplineInterpolator1D AKIMA_CUBIC_INSTANCE; static final String AKIMA_CUBIC_MONOTONE; static final MonotonicityPreservingCubicSplineInterpolator1D AKIMA_CUBIC_MONOTONE_INSTANCE; static final String AKIMA_CUBIC_NONNEGATIVE; static final NonnegativityPreservingCubicSplineInterpolator1D AKIMA_CUBIC_NONNEGATIVE_INSTANCE; static final String MONOTONE_CONVEX_CUBIC; static final MonotoneConvexSplineInterpolator1D MONOTONE_CONVEX_CUBIC_INSTANCE; static final String C2_SHAPE_PRESERVING_CUBIC; static final ShapePreservingCubicSplineInterpolator1D C2_SHAPE_PRESERVING_CUBIC_INSTANCE; static final String LOG_NATURAL_CUBIC_MONOTONE; static final LogNaturalCubicMonotonicityPreservingInterpolator1D LOG_NATURAL_CUBIC_MONOTONE_INSTANCE; static final String LOG_NATURAL_CUBIC; static final LogNaturalCubicInterpolator1D LOG_NATURAL_CUBIC_INSTANCE; static final String LOG_NOTAKNOT_CUBIC; static final LogNotAKnotCubicSplineInterpolator1D LOG_NOTAKNOT_CUBIC_INSTANCE; static final String LOG_CLAMPED_CUBIC; static final LogClampedCubicSplineInterpolator1D LOG_CLAMPED_CUBIC_INSTANCE; static final String PRODUCT_NATURAL_CUBIC; static final ProductPiecewisePolynomialInterpolator1D PRODUCT_NATURAL_CUBIC_INSTANCE; static final String PRODUCT_POLYNOMIAL_EXTRAPOLATOR; static final String RECIPROCAL_EXTRAPOLATOR; static final String SQUARE_LINEAR; static final SquareLinearInterpolator1D SQUARE_LINEAR_INSTANCE; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testBadName() { Interpolator1DFactory.getInterpolator("x"); }