@Test public void testIntersects(){ assertEquals("(0,1]", new Range<Integer>(Integer.class, 0, false, 1, true ), UNIT.intersect(POSITIVE)); assertEquals("[-1,0)", new Range<Integer>(Integer.class,-1, true, 0, false), UNIT.intersect(NEGATIVE)); assertEquals(EMPTY, POSITIVE.intersect(NEGATIVE)); assertEquals("0+", ZERO, ZERO.intersect(NON_NEGATIVE)); assertEquals("0-", ZERO, ZERO.intersect(NON_POSITIVE)); assertTrue("positive does not include NEGATIVE so result is empty", POSITIVE.intersect(NEGATIVE).isEmpty()); assertTrue("positive does not include ZERO so result is empty", ZERO .intersect(POSITIVE).isEmpty()); assertTrue("negative does not include ZERO so result is empty", ZERO .intersect(NEGATIVE).isEmpty()); }
public boolean intersects(final Range<?> range) throws IllegalArgumentException { return intersectsNC(ensureCompatible(range)); }
Range implements Serializable { public boolean intersects(final Range<?> range) throws IllegalArgumentException { return intersectsNC(ensureCompatible(range)); } }
Range implements Serializable { public boolean intersects(final Range<?> range) throws IllegalArgumentException { return intersectsNC(ensureCompatible(range)); } 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 { public boolean intersects(final Range<?> range) throws IllegalArgumentException { return intersectsNC(ensureCompatible(range)); } 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 { public boolean intersects(final Range<?> range) throws IllegalArgumentException { return intersectsNC(ensureCompatible(range)); } 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();  }