public class PossibilityFilter
extends java.lang.Object
Constructor and Description |
---|
PossibilityFilter()
Constructor.
|
PossibilityFilter(int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isPossible(java.lang.Object testValue)
Is the value given possibly a value the filter was trained for?
|
void |
train(java.lang.Object validationValue)
Train the filter to recognize this value.
|
public PossibilityFilter()
public PossibilityFilter(int size)
size
- Size of the filter. The larger the size, the fewer false positives.public void train(java.lang.Object validationValue)
validationValue
- A valid value the filter should recognize. An exception will be thrown if this parameter is null.Values given here will return true when given to the isPossible method.
public boolean isPossible(java.lang.Object testValue)
testValue
- The value to test whether the filter recognizes it. An exception will be thrown if this parameter is null.