public interface Coverage
extend(java.lang.Object[])
method.
Once populated, tests for inclusion of other tuples in the coverage
thus represented can be performed by use of the createTestFactory()
method.
The details of how the accumulated set of input tuples affects the inclusion of test tuples are determined by the nature of the matching a given coverage implementation is designed to support. When used for crossmatching, the idea is that the coverage represents the region of space in which an external tuple must be included in order to be a potential match.
Instances of this class are not thread-safe, so should not be used from multiple threads concurrently.
Modifier and Type | Field and Description |
---|---|
static Coverage |
FULL
Instance representing full coverage.
|
Modifier and Type | Method and Description |
---|---|
String |
coverageText()
Provides a short, human-readable indication of the coverage.
|
java.util.function.Supplier<java.util.function.Predicate<Object[]>> |
createTestFactory()
Returns a supplier for an object that can test whether given
tuples are considered to fall within the current state of this
coverage object.
|
void |
extend(Object[] tuple)
Extends this coverage by adding a tuple to it.
|
void |
intersection(Coverage other)
Narrows this coverage object to contain only the intersection of
its current state and the supplied coverage.
|
boolean |
isEmpty()
Returns true if the coverage represents the empty set.
|
void |
union(Coverage other)
Modifies the state of this coverage object as if all the tuples
fed to the other had been fed to this one as well as its current
contents.
|
static final Coverage FULL
createTestFactory()
test always returns true.
Note that in accordance with the general contract, the set operations
are only supported for use with compatible coverage objects,
so attempting to perform an intersection with another coverage instance
will fail (with an UnsupportedOperationException).void extend(Object[] tuple)
tuple
- coordinate datajava.util.function.Supplier<java.util.function.Predicate<Object[]>> createTestFactory()
boolean isEmpty()
createTestFactory()
test
is guaranteed to return falsevoid intersection(Coverage other)
other
- different coverage object of a type
assumed compatible with this objectvoid union(Coverage other)
other
- different coverage object of a type
assumed compatible with this objectString coverageText()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.