de.jaetzold.util
Class ComplementRange
java.lang.Object
|
+--de.jaetzold.util.ComplementRange
- All Implemented Interfaces:
- Range
- public class ComplementRange
- extends Object
- implements Range
Method Summary |
boolean |
contains(double value)
Tells whether the given value is in the Range or not. |
boolean |
isCacheable()
Tells whether this instance will in the future produce the same result for the same arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComplementRange
public ComplementRange(Range targetRange)
contains
public boolean contains(double value)
- Description copied from interface:
Range
- Tells whether the given value is in the Range or not.
- Specified by:
contains
in interface Range
- Following copied from interface:
de.jaetzold.util.Range
- Returns:
- true, if the given value could be found inside the Range, false otherwise
isCacheable
public boolean isCacheable()
- Description copied from interface:
Range
- Tells whether this instance will in the future produce the same result for the same arguments.
This can be false first and then true at a later time, but it is not legal to return false here after a return of true in the past, because the true answer before was wrong then.
- Specified by:
isCacheable
in interface Range
- Following copied from interface:
de.jaetzold.util.Range
- Returns:
- true if this instance guarantees, that any further call to contains() with the same arguments returns the same result