@Test public void testPercentFloatingPointEquals() { SizeValue a = SizeValue.percent(10); SizeValue b = new SizeValue("10.0%"); SizeValue c = new SizeValue("10%"); assertEquals(a, b); assertEquals(a, c); }
@Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); }
SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } }
SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } SizeValue(@Nonnull final SizeValueType type);  SizeValue(final int value, @Nonnull final SizeValueType type);  SizeValue(@Nonnull final SizeValueType type, final int calculatedValue);  SizeValue(@Nullable final String valueParam); }
SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } SizeValue(@Nonnull final SizeValueType type);  SizeValue(final int value, @Nonnull final SizeValueType type);  SizeValue(@Nonnull final SizeValueType type, final int calculatedValue);  SizeValue(@Nullable final String valueParam); @Nonnull static SizeValue def(); @Nonnull static SizeValue def(final int pixelValue); @Nonnull static SizeValue px(final int pixelValue); @Nonnull static SizeValue percent(final int percentage); @Nonnull static SizeValue percentHeight(final int percentage); @Nonnull static SizeValue percentWidth(final int percentage); @Nonnull static SizeValue wildcard(); @Nonnull static SizeValue wildcard(final int computedValue); @Nonnull static SizeValue sum(); @Nonnull static SizeValue sum(final int computedValue); @Nonnull static SizeValue max(); @Nonnull static SizeValue max(final int computedValue); boolean isIndependentFromParent(); @Deprecated boolean isPercentOrPixel(); boolean hasValue(); float getValue(final float range); int getValueAsInt(final float range); String getValueAsString(); boolean isPixel(); boolean isPercent(); @Nonnull @Override String toString(); boolean hasDefault(); boolean hasWidthSuffix(); boolean hasHeightSuffix(); boolean hasWildcard(); boolean hasSum(); boolean hasMax(); @Override boolean equals(Object o); @Override int hashCode(); }
SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } SizeValue(@Nonnull final SizeValueType type);  SizeValue(final int value, @Nonnull final SizeValueType type);  SizeValue(@Nonnull final SizeValueType type, final int calculatedValue);  SizeValue(@Nullable final String valueParam); @Nonnull static SizeValue def(); @Nonnull static SizeValue def(final int pixelValue); @Nonnull static SizeValue px(final int pixelValue); @Nonnull static SizeValue percent(final int percentage); @Nonnull static SizeValue percentHeight(final int percentage); @Nonnull static SizeValue percentWidth(final int percentage); @Nonnull static SizeValue wildcard(); @Nonnull static SizeValue wildcard(final int computedValue); @Nonnull static SizeValue sum(); @Nonnull static SizeValue sum(final int computedValue); @Nonnull static SizeValue max(); @Nonnull static SizeValue max(final int computedValue); boolean isIndependentFromParent(); @Deprecated boolean isPercentOrPixel(); boolean hasValue(); float getValue(final float range); int getValueAsInt(final float range); String getValueAsString(); boolean isPixel(); boolean isPercent(); @Nonnull @Override String toString(); boolean hasDefault(); boolean hasWidthSuffix(); boolean hasHeightSuffix(); boolean hasWildcard(); boolean hasSum(); boolean hasMax(); @Override boolean equals(Object o); @Override int hashCode(); static final float MAX_PERCENT; }