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

org.kernelab.basis.IndexedMapper Maven / Gradle / Ivy

There is a newer version: 0.0.19-RELEASE
Show newest version
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