@Test public void testContains(){ assertTrue (UNIT.contains( 0)); assertTrue (UNIT.contains( 1)); assertTrue (UNIT.contains(-1)); assertFalse(UNIT.contains((Integer) null)); assertFalse(UNIT.contains(2)); assertFalse(POSITIVE.contains( 0)); assertTrue (POSITIVE.contains( 1)); assertFalse(POSITIVE.contains(-1)); assertFalse(NEGATIVE.contains( 0)); assertFalse(NEGATIVE.contains( 1)); assertTrue (NEGATIVE.contains(-1)); assertTrue (A.contains("Ardvark")); assertFalse(A.contains("Beaver" )); assertFalse(B.contains("Ardvark")); assertTrue (B.contains("Beaver" )); assertFalse(ZERO.contains(1)); assertTrue (ZERO.contains(0)); }
public boolean contains(final Comparable<?> value) throws IllegalArgumentException { if (value == null) { return false; } ensureCompatible(value.getClass()); @SuppressWarnings("unchecked") final T c = (T) value; return containsNC(c); }
Range implements Serializable { public boolean contains(final Comparable<?> value) throws IllegalArgumentException { if (value == null) { return false; } ensureCompatible(value.getClass()); @SuppressWarnings("unchecked") final T c = (T) value; return containsNC(c); } }
Range implements Serializable { public boolean contains(final Comparable<?> value) throws IllegalArgumentException { if (value == null) { return false; } ensureCompatible(value.getClass()); @SuppressWarnings("unchecked") final T c = (T) value; return containsNC(c); } 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 contains(final Comparable<?> value) throws IllegalArgumentException { if (value == null) { return false; } ensureCompatible(value.getClass()); @SuppressWarnings("unchecked") final T c = (T) value; return containsNC(c); } 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 contains(final Comparable<?> value) throws IllegalArgumentException { if (value == null) { return false; } ensureCompatible(value.getClass()); @SuppressWarnings("unchecked") final T c = (T) value; return containsNC(c); } 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();  }