@Test public void testEquals(){ assertEquals(EMPTY, new Range<Integer>(Integer.class, 2, -2)); assertEquals(UNIT, new Range<Integer>(Integer.class, -1, 1)); }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object != null && object.getClass().equals(getClass())) { final Range<?> other = (Range) object; if (Utilities.equals(elementClass, other.elementClass)) { if (isEmpty()) { return other.isEmpty(); } return Utilities.equals(minValue, other.minValue) && Utilities.equals(maxValue, other.maxValue) && isMinIncluded == other.isMinIncluded && isMaxIncluded == other.isMaxIncluded; } } return false; }
Range implements Serializable { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object != null && object.getClass().equals(getClass())) { final Range<?> other = (Range) object; if (Utilities.equals(elementClass, other.elementClass)) { if (isEmpty()) { return other.isEmpty(); } return Utilities.equals(minValue, other.minValue) && Utilities.equals(maxValue, other.maxValue) && isMinIncluded == other.isMinIncluded && isMaxIncluded == other.isMaxIncluded; } } return false; } }
Range implements Serializable { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object != null && object.getClass().equals(getClass())) { final Range<?> other = (Range) object; if (Utilities.equals(elementClass, other.elementClass)) { if (isEmpty()) { return other.isEmpty(); } return Utilities.equals(minValue, other.minValue) && Utilities.equals(maxValue, other.maxValue) && isMinIncluded == other.isMinIncluded && isMaxIncluded == other.isMaxIncluded; } } return false; } Range(final Class<T> elementClass, final T value);  Range(final Class<T> elementClass, final T minValue, final T maxValue);  Range(final Class<T> elementClass,
                 final T minValue, final boolean isMinIncluded,
                 final T maxValue, final boolean isMaxIncluded); }
Range implements Serializable { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object != null && object.getClass().equals(getClass())) { final Range<?> other = (Range) object; if (Utilities.equals(elementClass, other.elementClass)) { if (isEmpty()) { return other.isEmpty(); } return Utilities.equals(minValue, other.minValue) && Utilities.equals(maxValue, other.maxValue) && isMinIncluded == other.isMinIncluded && isMaxIncluded == other.isMaxIncluded; } } return false; } Range(final Class<T> elementClass, final T value);  Range(final Class<T> elementClass, final T minValue, final T maxValue);  Range(final Class<T> elementClass,
                 final T minValue, final boolean isMinIncluded,
                 final T maxValue, final boolean isMaxIncluded); Class<T> getElementClass(); T getMinValue(); boolean isMinIncluded(); T getMaxValue(); boolean isMaxIncluded(); boolean isEmpty(); boolean contains(final Comparable<?> value); boolean contains(final Range<?> range); boolean intersects(final Range<?> range); Range<?> intersect(final Range<?> range); Range<?>[] subtract(final Range<?> range); Range<?> union(final Range<?> range); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
Range implements Serializable { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object != null && object.getClass().equals(getClass())) { final Range<?> other = (Range) object; if (Utilities.equals(elementClass, other.elementClass)) { if (isEmpty()) { return other.isEmpty(); } return Utilities.equals(minValue, other.minValue) && Utilities.equals(maxValue, other.maxValue) && isMinIncluded == other.isMinIncluded && isMaxIncluded == other.isMaxIncluded; } } return false; } Range(final Class<T> elementClass, final T value);  Range(final Class<T> elementClass, final T minValue, final T maxValue);  Range(final Class<T> elementClass,
                 final T minValue, final boolean isMinIncluded,
                 final T maxValue, final boolean isMaxIncluded); Class<T> getElementClass(); T getMinValue(); boolean isMinIncluded(); T getMaxValue(); boolean isMaxIncluded(); boolean isEmpty(); boolean contains(final Comparable<?> value); boolean contains(final Range<?> range); boolean intersects(final Range<?> range); Range<?> intersect(final Range<?> range); Range<?>[] subtract(final Range<?> range); Range<?> union(final Range<?> range); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }