Package opennlp.tools.util

# Class ObjectStreamUtils

java.lang.Object
opennlp.tools.util.ObjectStreamUtils

public class ObjectStreamUtils extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectStreamUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> ObjectStream<T>`
  `concatenateObjectStream(Collection<ObjectStream<T>> streams)`
  Creates a single concatenated `ObjectStream` from multiple individual `streams` with the same type `ObjectStreamUtils`.
  `static <T> ObjectStream<T>`
  `concatenateObjectStream(ObjectStream<T>... streams)`
  Creates a single concatenated `ObjectStream` from multiple individual `streams` with the same type.
  `static <T> ObjectStream<T>`
  `createObjectStream(Collection<T> collection)`
  Creates an `ObjectStream` form a `Collection<T>`.
  `static <T> ObjectStream<T>`
  `createObjectStream(T... array)`
  Creates an `ObjectStream` form an array of `ObjectStreamUtils`.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ObjectStreamUtils

    public ObjectStreamUtils()

- ## Method Details

  - ### createObjectStream

    @SafeVarargs public static <T> ObjectStream<T> createObjectStream(T... array)
    Creates an `ObjectStream` form an array of `ObjectStreamUtils`.
    Type Parameters:
      `T` - The generic type of the elements in the `array`.
    Parameters:
      `array` - The elements to feed into the new `ObjectStream`.
    Returns:
      The `ObjectStream` over the array elements.

  - ### createObjectStream

    public static <T> ObjectStream<T> createObjectStream(Collection<T> collection)
    Creates an `ObjectStream` form a `Collection<T>`.
    Type Parameters:
      `T` - The generic type of the elements in the `collection`.
    Parameters:
      `collection` - The elements to feed into the new `ObjectStream`.
    Returns:
      The `ObjectStream` over the collection elements

  - ### concatenateObjectStream

    public static <T> ObjectStream<T> concatenateObjectStream(Collection<ObjectStream<T>> streams)
    Creates a single concatenated `ObjectStream` from multiple individual `streams` with the same type `ObjectStreamUtils`.
    Type Parameters:
      `T` - The generic type of the elements in the `collection`.
    Parameters:
      `streams` - The collection of streams to feed into the concatenated `ObjectStream`. Every element of the collection must not be `null`.
    Returns:
      The concatenated `ObjectStream` aggregating all elements in `streams`.

  - ### concatenateObjectStream

    @SafeVarargs public static <T> ObjectStream<T> concatenateObjectStream(ObjectStream<T>... streams)
    Creates a single concatenated `ObjectStream` from multiple individual `streams` with the same type.
    Type Parameters:
      `T` - The generic type of the elements in the `streams`.
    Parameters:
      `streams` - One or more stream to feed into the concatenated `ObjectStream`. Every element of the collection must not be `null`.
    Returns:
      The concatenated `ObjectStream` aggregating all elements in `streams`.