IUnaryIndexFunction.java :  » Algebra » symja » org » matheclipse » generic » interfaces » Java Open Source

Java Open Source » Algebra » symja 
symja » org » matheclipse » generic » interfaces » IUnaryIndexFunction.java
package org.matheclipse.generic.interfaces;

import javax.annotation.Nullable;

/**
 * A {@code IUnaryIndexFunction} provides a transformation of an integer and an
 * object and returns the resulting object. 
 * 
 * <p>
 * The transformation on the source object does not necessarily result in an
 * object of a different type.
 * 
 * <p>
 * Implementors of BiFunction which may cause side effects upon evaluation are
 * strongly encouraged to state this fact clearly in their API documentation.
 * 
 */
public interface IUnaryIndexFunction<F1, T> {

  /**
   * Applys the function to an integer and an object of types {@code F1},
   * resulting in an object of type {@code T}. Note that types {@code F1} and
   * {@code T} may or may not be the same.
   * 
   * @param index
   *          The current processed index.
   * @param from1
   *          The first source object.
   * @return The resulting object.
   */
  T apply(int index, @Nullable F1 from1);
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.