ariba.util.core
Class ModMofNPredicate<T>

java.lang.Object
  extended by ariba.util.core.Predicate<T>
      extended by ariba.util.core.ModMofNPredicate<T>
Type Parameters:
T -

public class ModMofNPredicate<T>
extends Predicate<T>

Implements a predicate on the mod of some hash function of T. The actual predicate on the hashed value is defined as modValLower <= (hash % modWhat) < modValUpper


Nested Class Summary
 
Nested classes/interfaces inherited from class ariba.util.core.Predicate
Predicate.Constant<T>
 
Constructor Summary
ModMofNPredicate(PropertyHasher<T> hasher, int modWhat, int modValLower, int modValUpper)
          The mod predicate (see above) is configured via the 3 parameters.
 
Method Summary
 boolean evaluate(T t)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModMofNPredicate

public ModMofNPredicate(PropertyHasher<T> hasher,
                        int modWhat,
                        int modValLower,
                        int modValUpper)
The mod predicate (see above) is configured via the 3 parameters. If the result of the mod satisfies this predicate: lowerBound <= result < upperBound the the predicate is satisfied.

Parameters:
hasher -
modWhat -
modValLower -
modValUpper -
Method Detail

evaluate

public boolean evaluate(T t)
Specified by:
evaluate in class Predicate<T>


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.