@Test public void testConvertToLinearInterpolatorEmpty() { assertNull(effectValues.toLinearInterpolator()); }
@Nullable public LinearInterpolator toLinearInterpolator() { if (values.isEmpty()) { return null; } if (!containsTimeValues()) { return null; } LinearInterpolator interpolator = new LinearInterpolator(); for (Attributes p : values) { interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value")); } return interpolator; }
EffectPropertiesValues { @Nullable public LinearInterpolator toLinearInterpolator() { if (values.isEmpty()) { return null; } if (!containsTimeValues()) { return null; } LinearInterpolator interpolator = new LinearInterpolator(); for (Attributes p : values) { interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value")); } return interpolator; } }
EffectPropertiesValues { @Nullable public LinearInterpolator toLinearInterpolator() { if (values.isEmpty()) { return null; } if (!containsTimeValues()) { return null; } LinearInterpolator interpolator = new LinearInterpolator(); for (Attributes p : values) { interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value")); } return interpolator; }  }
EffectPropertiesValues { @Nullable public LinearInterpolator toLinearInterpolator() { if (values.isEmpty()) { return null; } if (!containsTimeValues()) { return null; } LinearInterpolator interpolator = new LinearInterpolator(); for (Attributes p : values) { interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value")); } return interpolator; }  void add(final Attributes p); @Nonnull List<Attributes> getValues(); @Nullable LinearInterpolator toLinearInterpolator(); boolean containsTimeValues(); }
EffectPropertiesValues { @Nullable public LinearInterpolator toLinearInterpolator() { if (values.isEmpty()) { return null; } if (!containsTimeValues()) { return null; } LinearInterpolator interpolator = new LinearInterpolator(); for (Attributes p : values) { interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value")); } return interpolator; }  void add(final Attributes p); @Nonnull List<Attributes> getValues(); @Nullable LinearInterpolator toLinearInterpolator(); boolean containsTimeValues();  }