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

net.pincette.rs.Encoder Maven / Gradle / Ivy

package net.pincette.rs;

import java.util.List;

/**
 * The interface for stateful encoders op value streams.
 *
 * @param  the incoming value type.
 * @param  the outgoing value type.
 * @author Werner Donn\u00e9
 * @since 3.0
 */
public interface Encoder {
  /**
   * This method is called when the stream has completed. It provides the opportunity to generate
   * the last values from remaining state.
   *
   * @return The last values.
   */
  List complete();

  /**
   * This method is called for each incoming value.
   *
   * @param value the value.
   * @return The list of generated values.
   */
  List encode(final T value);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy