com.ibm.tivoli.maximo.integrity.repair

Class PossibilityFilter

  • java.lang.Object
    • com.ibm.tivoli.maximo.integrity.repair.PossibilityFilter


  • public class PossibilityFilter
    extends java.lang.Object
    The possibility filter is used to get a good idea whether an object belongs in a set. This is useful when that set is too big to fit in memory. Once trained, the set will return no false negatives, but can return false positives. The chance of false positives depends on the size of the filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PossibilityFilter

        public PossibilityFilter()
        Constructor. Creates filter with the default size of 1,048,576, a.k.a. one megabyte.
      • PossibilityFilter

        public PossibilityFilter(int size)
        Constructor.
        Parameters:
        size - Size of the filter. The larger the size, the fewer false positives.
    • Method Detail

      • isPossible

        public boolean isPossible(java.lang.Object testValue)
        Is the value given possibly a value the filter was trained for?
        Parameters:
        testValue - The value to test whether the filter recognizes it. An exception will be thrown if this parameter is null.
        Returns:
        This method will always return true if the test value matches a value this filter was trained with. If value isn't one trained for, there is a chance this method will still return true. If this method returns false, there is no chance the testValue was trained for.