org.plumelib.util.Partitioner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plume-util Show documentation
Show all versions of plume-util Show documentation
Utility libraries for Java. Complements Guava, Apache Commons, etc.
package org.plumelib.util;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A Partitioner accepts Objects and assigns them to an equivalence class.
*
* @param the type of elements to be classified
* @param the type of equivalence classes (classification buckets)
* @see MultiRandSelector
*/
public interface Partitioner {
/**
* Returns a key representing the bucket containing obj.
*
* @param obj the Object to be assigned to a bucket
* @return a key representing the bucket containing obj
*/
CLASS assignToBucket(ELEMENT obj);
}