All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jparams.store.index.comparison.ComparisonPolicy Maven / Gradle / Ivy

There is a newer version: 3.1.4
Show newest version
package com.jparams.store.index.comparison;

/**
 * Transforms a given key into a comparable key.
 *
 * @param  type
 */
public interface ComparisonPolicy
{
    /**
     * Returns true if comparison is supported for this class type
     *
     * @param clazz class to check for support
     * @return true if supported
     */
    boolean supports(Class clazz);

    /**
     * Transform the given item into the comparable type
     *
     * @param item item
     * @return comparable
     */
    T createComparable(T item);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy