
org.kernelab.basis.IndexedMapper Maven / Gradle / Ivy
package org.kernelab.basis;
import java.io.Serializable;
/**
* The Mapper interface is to achieve the mapping operation.
*
* @author Dilly King
*
* @param
* The generic type of the elements to be mapped in a certain
* Collection.
* @param
* The generic type of the mapping result.
*/
public interface IndexedMapper extends Serializable
{
/**
* To map a value into another value.
*
* @param key
* The certain value to be mapped.
* @param index
* The index (ZERO based) of the element in the Iterable object.
* @return A mapped value.
* @throws Terminator
* to terminate the mapping procedure. {@link Terminator#SIGNAL}
* is recommended.
* @see Mapper#map(Object)
* @see Tools#map(Iterable, IndexedMapper, Collection)
*/
public V map(K key, int index);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy